3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $spacePosition = strpos("marco perone", ""); $name = substr($driverLicenseName, 0, $spacePosition); $surname = substr($driverLicenseName, $spacePosition); var_dump($name); var_dump($surname);
Output for 7.0.0 - 7.2.8
Warning: strpos(): Empty needle in /in/LMjUF on line 3 Notice: Undefined variable: driverLicenseName in /in/LMjUF on line 5 Notice: Undefined variable: driverLicenseName in /in/LMjUF on line 7 string(0) "" string(0) ""
Output for 5.3.22 - 5.3.29, 5.4.12 - 5.6.28
Warning: strpos(): Empty needle in /in/LMjUF on line 3 Notice: Undefined variable: driverLicenseName in /in/LMjUF on line 5 Notice: Undefined variable: driverLicenseName in /in/LMjUF on line 7 bool(false) bool(false)
Output for 5.3.20 - 5.3.21, 5.4.10 - 5.4.11
Warning: strpos(): Empty delimiter in /in/LMjUF on line 3 Notice: Undefined variable: driverLicenseName in /in/LMjUF on line 5 Notice: Undefined variable: driverLicenseName in /in/LMjUF on line 7 bool(false) bool(false)