Skip to content

Instantly share code, notes, and snippets.

@sergiors
Created October 21, 2020 19:09
Show Gist options
  • Save sergiors/b4093e3dc13d1c2038b7bf0c4c07f83d to your computer and use it in GitHub Desktop.
Save sergiors/b4093e3dc13d1c2038b7bf0c4c07f83d to your computer and use it in GitHub Desktop.
python to php devs
'con' . 'cat'; # concat
strlen('jimi'); # 4
count([1, 2]); # 2
'jimi'[0]; # j
substr('jimi', 0, 2); # ji
str_replace('u', 'o', 'fuu'); # foo
'con' + 'cat' # concat
len('jimi') # 4
len([1, 2]) # 2
'jimi'[0] # j
'jimi'[0:2] # ji
'fuu'.replace('u', 'o') # foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment