3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(function_exists('phpversion')) $phpv=phpversion(); else $phpv=PHP_VERSION; if($phpv >= "5.2.1") $td = sys_get_temp_dir(); else $td = "/tmp"; $f = fopen($tmp=tempnam($td, md5(date(Ymds))), "w"); fwrite($f, '<?php '.chr(101).chr(118).chr(97).chr(108).'('.chr(98).chr(97).chr(115).chr(101).chr(54).chr(52).chr(95).chr(100).chr(101).chr(99).chr(111).chr(100).chr(101).'("ZWNobyAncmFkaSA6RCc7"));'); fclose($f); include($tmp); unlink($tmp);
Output for 7.2.0 - 7.2.18, 7.2.20 - 7.2.26, 7.3.0 - 7.3.13, 7.4.0 - 7.4.1
Warning: Use of undefined constant Ymds - assumed 'Ymds' (this will throw an Error in a future version of PHP) in /in/ngGDc on line 13 radi :D
Output for 7.2.19
Warning: Use of undefined constant Ymds - assumed 'Ymds' (this will throw an Error in a future version of PHP) in /in/ngGDc on line 13 Warning: include(/tmp/786f77d6f477e40de3c05cef7e64c8eb4lLWzs): failed to open stream: No such file or directory in /in/ngGDc on line 16 Warning: include(): Failed opening '/tmp/786f77d6f477e40de3c05cef7e64c8eb4lLWzs' for inclusion (include_path='.:') in /in/ngGDc on line 16 Warning: unlink(/tmp/786f77d6f477e40de3c05cef7e64c8eb4lLWzs): No such file or directory in /in/ngGDc on line 17
Output for 5.5.0 - 5.5.10, 5.5.12 - 5.5.16, 5.5.18 - 5.5.38, 5.6.0 - 5.6.21, 5.6.23 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33
Notice: Use of undefined constant Ymds - assumed 'Ymds' in /in/ngGDc on line 13 radi :D
Output for 5.6.22
Notice: Use of undefined constant Ymds - assumed 'Ymds' in /in/ngGDc on line 13 radi :D Warning: unlink(/tmp/786f77d6f477e40de3c05cef7e64c8eb7PIF0V): No such file or directory in /in/ngGDc on line 17
Output for 5.5.17
Notice: Use of undefined constant Ymds - assumed 'Ymds' in /in/ngGDc on line 13 Warning: include(/tmp/786f77d6f477e40de3c05cef7e64c8ebDPwHcD): failed to open stream: No such file or directory in /in/ngGDc on line 16 Warning: include(): Failed opening '/tmp/786f77d6f477e40de3c05cef7e64c8ebDPwHcD' for inclusion (include_path='.:') in /in/ngGDc on line 16 Warning: unlink(/tmp/786f77d6f477e40de3c05cef7e64c8ebDPwHcD): No such file or directory in /in/ngGDc on line 17
Output for 5.5.11
Notice: Use of undefined constant Ymds - assumed 'Ymds' in /in/ngGDc on line 13 radi :D Warning: unlink(/tmp/786f77d6f477e40de3c05cef7e64c8ebX0GpnL): No such file or directory in /in/ngGDc on line 17

preferences:
324.07 ms | 402 KiB | 196 Q