3v4l.org

run code in 300+ PHP versions simultaneously
<?php $path = "/var/www/foo"; var_dump($pаth."/user/supplied/path"); // prints /user/supplied/path, and emits a notice // let's write a random number generator function crypto_rnd() { $rnd = openssl_random_pseudo_bytes(100); // most likely secure $today = date('c'); // extra entropy can't hurt! return hash("sha512", $r⁠n.$today); // oops, that's actually r\u2060nd, which is undefined, i.e. NULL, i.e. pwned } var_dump(crypto_rnd() === crypto_rnd()); // uh oh...
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Warning: Undefined variable $pаth in /in/ijc32 on line 4 string(19) "/user/supplied/path" Fatal error: Uncaught Error: Call to undefined function openssl_random_pseudo_bytes() in /in/ijc32:8 Stack trace: #0 /in/ijc32(13): crypto_rnd() #1 {main} thrown in /in/ijc32 on line 8
Process exited with code 255.
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31, 7.4.3 - 7.4.33
Notice: Undefined variable: pаth in /in/ijc32 on line 4 string(19) "/user/supplied/path" Fatal error: Uncaught Error: Call to undefined function openssl_random_pseudo_bytes() in /in/ijc32:8 Stack trace: #0 /in/ijc32(13): crypto_rnd() #1 {main} thrown in /in/ijc32 on line 8
Process exited with code 255.
Output for 7.3.32 - 7.3.33
string(19) "/user/supplied/path" Fatal error: Uncaught Error: Call to undefined function openssl_random_pseudo_bytes() in /in/ijc32:8 Stack trace: #0 /in/ijc32(13): crypto_rnd() #1 {main} thrown in /in/ijc32 on line 8
Process exited with code 255.
Output for 5.4.15 - 5.4.45, 5.5.0 - 5.5.37, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.7
Notice: Undefined variable: pаth in /in/ijc32 on line 4 string(19) "/user/supplied/path" Notice: Undefined variable: r⁠n in /in/ijc32 on line 10 Notice: Undefined variable: r⁠n in /in/ijc32 on line 10 bool(true)
Output for 5.0.4 - 5.0.5, 5.1.1 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.14
Notice: Undefined variable: pаth in /in/ijc32 on line 4 string(19) "/user/supplied/path" Fatal error: Call to undefined function openssl_random_pseudo_bytes() in /in/ijc32 on line 8
Process exited with code 255.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/ijc32 on line 13
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: pаth in /in/ijc32 on line 4 string(19) "/user/supplied/path" Fatal error: Call to undefined function openssl_random_pseudo_bytes() in /in/ijc32 on line 8
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: Undefined variable: pаth in /in/ijc32 on line 4 string(19) "/user/supplied/path" Fatal error: Call to undefined function: openssl_random_pseudo_bytes() in /in/ijc32 on line 8
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Notice: Undefined variable: pаth in /in/ijc32 on line 4 string(19) "/user/supplied/path" Fatal error: Call to undefined function: openssl_random_pseudo_bytes() in /in/ijc32 on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: pаth in /in/ijc32 on line 4 string(19) "/user/supplied/path" Fatal error: Call to undefined function: openssl_random_pseudo_bytes() in /in/ijc32 on line 8

preferences:
266.72 ms | 402 KiB | 344 Q