3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($x = 1; $x <= 10; $x++) { $mykey = "\x00" . uniqid(); $var = array(); $var[$mykey] = TRUE; foreach($var as $key => $val) { if ($key === $mykey) { echo 'You got it right' . PHP_EOL; } else { echo 'You got it wrong' . PHP_EOL; } } usleep(10); }
Output for 5.0.2 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.13, 7.3.0 - 7.3.1
You got it right You got it right You got it right You got it right You got it right You got it right You got it right You got it right You got it right You got it right
Output for 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL
Output for 4.3.10 - 4.3.11, 4.4.0 - 4.4.9
Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 You got it right Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 You got it right Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 You got it right Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 You got it right Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 You got it right Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 You got it right Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 You got it right Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 You got it right Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 You got it right Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 You got it right
Output for 4.3.3 - 4.3.9
Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 9 You got it rightPHP_EOL
Output for 4.3.0 - 4.3.2
Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 11 You got it wrongPHP_EOL Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 11 You got it wrongPHP_EOL Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 11 You got it wrongPHP_EOL Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 11 You got it wrongPHP_EOL Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 11 You got it wrongPHP_EOL Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 11 You got it wrongPHP_EOL Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 11 You got it wrongPHP_EOL Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 11 You got it wrongPHP_EOL Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 11 You got it wrongPHP_EOL Warning: uniqid() expects at least 1 parameter, 0 given in /in/gNiOe on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gNiOe on line 11 You got it wrongPHP_EOL

preferences:
139.3 ms | 405 KiB | 190 Q