3v4l.org

run code in 300+ PHP versions simultaneously
<?php stream_wrapper_unregister('file'); stream_wrapper_register('file', InvalidStreamWrapper::class); echo '========file_get_contents' . PHP_EOL; echo file_get_contents('non-exists-file'); echo '========require' . PHP_EOL; require 'non-exists-file'; class InvalidStreamWrapper { public $context; private $content = "<?php echo time() . PHP_EOL; ?>\n"; private $counter = 0; public function stream_read($count) { if ($this->counter > 2) { return ''; } $this->counter++; return $this->content;; } public function stream_stat() { return true; } public function stream_open($path, $mode, $options, &$opened_path): bool { return true; } public function stream_eof(): bool { return true; } public function stream_set_option($option, $arg1, $arg2) { return true; } }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.4.20.0100.01019.72
8.4.10.0110.00719.32
8.3.150.0070.01120.77
8.3.140.0030.00616.77
8.3.130.0100.00618.38
8.3.120.0040.00418.90
8.3.110.0070.01320.94
8.3.100.0090.00924.06
8.3.90.0040.00426.77
8.3.80.0060.00318.18
8.3.70.0100.00718.43
8.3.60.0110.00416.38
8.3.50.0040.01118.39
8.3.40.0130.01023.84
8.3.30.0100.00319.21
8.3.20.0070.00024.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.270.0160.00317.13
8.2.260.0040.00418.94
8.2.250.0040.00416.69
8.2.240.0090.01518.83
8.2.230.0090.00922.58
8.2.220.0030.01337.54
8.2.210.0080.01126.77
8.2.200.0030.00616.63
8.2.190.0120.00616.75
8.2.180.0070.00716.36
8.2.170.0100.01022.96
8.2.160.0150.00022.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00019.36
8.2.110.0090.00019.27
8.2.100.0350.00618.44
8.2.90.0280.00418.44
8.2.80.0290.00418.44
8.2.70.0230.00818.44
8.2.60.0220.00718.44
8.2.50.0260.00418.44
8.2.40.0240.00418.44
8.2.30.0220.00418.44
8.2.20.0240.00418.44
8.2.10.0240.00318.44
8.2.00.0270.00018.44
8.1.310.0080.00316.80
8.1.300.0080.00016.22
8.1.290.0000.00918.88
8.1.280.0040.01125.92
8.1.270.0000.00724.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00323.97
8.1.230.0240.00418.44
8.1.220.0190.00818.44
8.1.210.0230.00318.44
8.1.200.0230.00418.44
8.1.190.0210.00518.44
8.1.180.0230.00418.44
8.1.170.0240.00318.44
8.1.160.0230.00318.44
8.1.150.0240.00318.44
8.1.140.0220.00418.44
8.1.130.0130.01318.44
8.1.120.0230.00318.44
8.1.110.0250.00418.44
8.1.100.0210.00718.44
8.1.90.0290.00018.44
8.1.80.0250.00318.44
8.1.70.0200.00718.44
8.1.60.0320.00018.44
8.1.50.0260.00018.44
8.1.40.0210.00318.44
8.1.30.0210.00518.44
8.1.20.0210.00618.44
8.1.10.0190.00818.44
8.1.00.0170.00718.44
8.0.300.0110.00618.44
8.0.290.0250.00318.44
8.0.280.0230.00818.44
8.0.270.0220.00618.44
8.0.260.0270.00018.44
8.0.250.0270.00018.44
8.0.240.0240.00518.44
8.0.230.0220.00618.44
8.0.220.0240.00318.44
8.0.210.0250.00318.44
8.0.200.0280.00018.44
8.0.190.0200.00818.44
8.0.180.0250.00318.44
8.0.170.0210.00618.44
8.0.160.0240.00318.44
8.0.150.0180.00518.44
8.0.140.0270.00018.44
8.0.130.0180.00418.44
8.0.120.0210.00718.44
8.0.110.0200.00418.44
8.0.100.0250.00018.44
8.0.90.0190.00618.44
8.0.80.0240.00018.44
8.0.70.0210.00418.44
8.0.60.0200.00718.44
8.0.50.0220.00318.44
8.0.30.0210.00818.44
8.0.20.0270.00418.44
8.0.10.0380.00418.44

preferences:
37.17 ms | 402 KiB | 5 Q