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 $size = 32; private $counter = 0; public function stream_read($count) { if ($this->counter > 2) { return ''; } $this->counter++; return $this->content;; } public function stream_stat() { return ['size' => $this->size]; } 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.0130.01019.65
8.4.10.0030.00519.34
8.3.150.0120.00620.87
8.3.140.0040.00417.26
8.3.130.0060.00318.29
8.3.120.0060.00319.13
8.3.110.0050.00520.94
8.3.100.0000.00824.06
8.3.90.0030.00626.77
8.3.80.0030.00718.43
8.3.70.0070.01718.31
8.3.60.0110.00716.50
8.3.50.0110.00716.56
8.3.40.0140.00023.66
8.3.30.0140.00019.23
8.3.20.0000.00824.18
8.3.10.0080.00024.66
8.3.00.0080.00026.16
8.2.270.0110.00717.48
8.2.260.0110.00416.54
8.2.250.0090.00018.60
8.2.240.0130.00318.86
8.2.230.0070.00722.58
8.2.220.0120.00937.54
8.2.210.0110.00426.77
8.2.200.0040.00716.75
8.2.190.0070.00717.00
8.2.180.0040.01117.00
8.2.170.0090.00619.09
8.2.160.0100.00322.96
8.2.150.0080.00025.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00721.13
8.2.110.0070.00320.81
8.2.100.0220.01018.44
8.2.90.0240.00618.44
8.2.80.0250.00418.44
8.2.70.0290.00018.44
8.2.60.0270.00218.44
8.2.50.0240.00618.44
8.2.40.0240.00318.44
8.2.30.0220.00618.44
8.2.20.0280.00018.44
8.2.10.0240.00318.44
8.2.00.0210.00518.44
8.1.310.0100.00718.48
8.1.300.0060.00319.55
8.1.290.0090.00030.84
8.1.280.0070.01125.92
8.1.270.0050.00324.66
8.1.260.0040.00426.35
8.1.250.0090.00028.09
8.1.240.0090.00022.74
8.1.230.0170.01118.44
8.1.220.0270.00418.44
8.1.210.0290.00718.44
8.1.200.0150.01518.44
8.1.190.0220.00618.44
8.1.180.0230.00318.44
8.1.170.0200.00618.44
8.1.160.0250.00318.44
8.1.150.0240.00318.44
8.1.140.0200.00718.44
8.1.130.0200.00718.44
8.1.120.0200.00718.44
8.1.110.0210.01318.44
8.1.100.0260.00418.44
8.1.90.0270.00318.44
8.1.80.0230.00718.44
8.1.70.0270.00318.44
8.1.60.0240.00418.44
8.1.50.0230.00318.44
8.1.40.0160.00818.44
8.1.30.0240.00318.44
8.1.20.0170.01018.44
8.1.10.0230.00418.44
8.1.00.0190.00418.44
8.0.300.0170.00618.44
8.0.290.0210.00618.44
8.0.280.0150.01118.44
8.0.270.0240.00318.44
8.0.260.0180.00918.44
8.0.250.0240.00418.44
8.0.240.0210.00718.44
8.0.230.0180.00918.44
8.0.220.0280.00018.44
8.0.210.0200.00718.44
8.0.200.0290.00018.44
8.0.190.0230.00418.44
8.0.180.0270.00418.44
8.0.170.0280.00018.44
8.0.160.0270.00018.44
8.0.150.0120.00918.44
8.0.140.0280.00018.44
8.0.130.0200.00018.44
8.0.120.0200.00818.44
8.0.110.0210.00418.44
8.0.100.0130.01318.44
8.0.90.0300.00018.44
8.0.80.0210.00518.44
8.0.70.0200.00718.44
8.0.60.0170.00818.44
8.0.50.0180.00718.44
8.0.30.0270.00018.44
8.0.20.0240.00318.44
8.0.10.0200.00718.44

preferences:
47.35 ms | 402 KiB | 5 Q