3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i256 = str_replace(',', '', '115,792,089,237,316,195,423,570,985,008,687,907,853,269,984,665,640,564,039,457,584,007,913,129,639,936'); error_reporting((int) $i256); $t = true; ob_start(); session_name(urlencode('a[b]')); session_start(); ob_end_clean(); if(isset($_SESSION['hi'])) { $t = false; } $text = ini_get('session.save_path') . '/sess_' . $_COOKIE['a']['b']; function get_include_contents($filename) { //if (is_file($filename)) { ob_start(); include $filename; $var = ob_get_contents(); ob_end_clean(); return $var; //} return false; } $string = get_include_contents($text); $_SESSION['hi'] = 'user2'; var_dump($string); ?>
Output for 8.5.1
Warning: The float-string "115792089237316195423570985008687907853269984665640564039457584007913129639936" is not representable as an int, cast occurred in /in/43Hl7 on line 4 Warning: Undefined array key "a" in /in/43Hl7 on line 13 Warning: Trying to access array offset on null in /in/43Hl7 on line 13 string(203) " Warning: include(/sess_): Failed to open stream: No such file or directory in /in/43Hl7 on line 18 Warning: include(): Failed opening '/sess_' for inclusion (include_path='.:') in /in/43Hl7 on line 18 "
Output for 8.5.0
Warning: The float-string "115792089237316195423570985008687907853269984665640564039457584007913129639936" is not representable as an int, cast occurred in /in/43Hl7 on line 4 Warning: Undefined array key "a" in /in/43Hl7 on line 13 Warning: Trying to access array offset on null in /in/43Hl7 on line 13 string(346) " Warning: include(): open_basedir restriction in effect. File(/sess_) is not within the allowed path(s): (/tmp:/in:/etc) in /in/43Hl7 on line 18 Warning: include(/sess_): Failed to open stream: Operation not permitted in /in/43Hl7 on line 18 Warning: include(): Failed opening '/sess_' for inclusion (include_path='.:') in /in/43Hl7 on line 18 "
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.
Output for 8.3.0 - 8.3.28, 8.4.1 - 8.4.14
Warning: Undefined array key "a" in /in/43Hl7 on line 13 Warning: Trying to access array offset on null in /in/43Hl7 on line 13 string(346) " Warning: include(): open_basedir restriction in effect. File(/sess_) is not within the allowed path(s): (/tmp:/in:/etc) in /in/43Hl7 on line 18 Warning: include(/sess_): Failed to open stream: Operation not permitted in /in/43Hl7 on line 18 Warning: include(): Failed opening '/sess_' for inclusion (include_path='.:') in /in/43Hl7 on line 18 "
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29
Warning: Undefined array key "a" in /in/43Hl7 on line 13 Warning: Trying to access array offset on value of type null in /in/43Hl7 on line 13 string(346) " Warning: include(): open_basedir restriction in effect. File(/sess_) is not within the allowed path(s): (/tmp:/in:/etc) in /in/43Hl7 on line 18 Warning: include(/sess_): Failed to open stream: Operation not permitted in /in/43Hl7 on line 18 Warning: include(): Failed opening '/sess_' for inclusion (include_path='.:') in /in/43Hl7 on line 18 "

preferences:
55.26 ms | 415 KiB | 5 Q