3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FooWrapper { protected $opened = false; public function stream_close() { if (!$this->opened) { throw new RuntimeException("Closing an unopened stream"); } $this->opened = false; } public function stream_open($path, $mode, $options, &$opened_path) { if ($this->opened) { throw new Exception("opened already"); } if ($path == "foo://foo") { throw new Exception("Foo"); } $this->opened = true; return true; } public function stream_read($count) { return str_repeat('f', $count); } } stream_wrapper_register("foo", "FooWrapper"); try { $foo = fopen("foo://foo", "r"); } catch (Exception $e) { var_dump($e); } try { $f = fopen("foo://bar", "r"); var_dump(fread($f, 10)); fclose($f); } catch (Exception $e) { var_dump($e); }

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.3.60.0160.00316.88
8.3.50.0130.00922.00
8.3.40.0060.00918.95
8.3.30.0090.00619.25
8.3.20.0040.00420.25
8.3.10.0050.00321.73
8.3.00.0000.00819.19
8.2.180.0090.00916.88
8.2.170.0120.00322.96
8.2.160.0130.00022.11
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0060.00319.54
8.2.110.0200.00322.12
8.2.100.0060.00617.91
8.2.90.0030.00519.18
8.2.80.0000.00917.97
8.2.70.0040.00417.63
8.2.60.0040.00417.93
8.2.50.0060.00318.07
8.2.40.0040.00418.21
8.2.30.0000.00819.39
8.2.20.0050.00317.70
8.2.10.0040.00417.98
8.2.00.0040.00417.73
8.1.280.0040.01825.92
8.1.270.0090.00020.77
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0080.00322.05
8.1.230.0070.00417.51
8.1.220.0080.00017.78
8.1.210.0000.00818.77
8.1.200.0100.00017.35
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0030.00618.38
8.1.160.0040.00421.97
8.1.150.0000.00718.80
8.1.140.0000.00919.23
8.1.130.0000.00717.92
8.1.120.0040.00417.57
8.1.110.0080.00017.53
8.1.100.0000.00717.44
8.1.90.0000.00717.57
8.1.80.0000.00717.49
8.1.70.0000.00817.52
8.1.60.0080.00017.54
8.1.50.0080.00317.58
8.1.40.0060.00317.45
8.1.30.0040.00417.68
8.1.20.0080.00017.73
8.1.10.0000.00817.54
8.1.00.0050.00317.56
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00718.51
8.0.270.0070.00017.29
8.0.260.0030.00317.28
8.0.250.0000.00717.11
8.0.240.0030.00317.01
8.0.230.0000.00717.13
8.0.220.0030.00317.11
8.0.210.0000.00716.91
8.0.200.0070.00017.07
8.0.190.0040.00417.14
8.0.180.0040.00417.04
8.0.170.0040.00417.01
8.0.160.0040.00417.01
8.0.150.0040.00417.00
8.0.140.0000.00717.00
8.0.130.0000.00613.55
8.0.120.0050.00317.07
8.0.110.0000.00716.97
8.0.100.0000.00716.99
8.0.90.0040.00417.06
8.0.80.0070.01117.02
8.0.70.0000.00817.05
8.0.60.0040.00416.94
8.0.50.0050.00317.12
8.0.30.0070.01617.07
8.0.20.0130.01117.40
8.0.10.0050.00317.11
8.0.00.0110.00916.93
7.4.330.0000.00515.03
7.4.320.0030.00316.50
7.4.300.0000.00616.63
7.4.290.0000.00716.57
7.4.280.0030.00916.53
7.4.270.0030.00316.65
7.4.260.0030.00516.54
7.4.250.0080.00016.62
7.4.240.0020.00516.62
7.4.230.0020.00516.31
7.4.220.0130.01416.70
7.4.210.0090.00916.51
7.4.200.0040.00416.48
7.4.160.0070.01016.46
7.4.150.0050.01517.40
7.4.140.0110.01417.86
7.4.130.0110.00616.59
7.4.120.0090.01016.55
7.4.110.0120.01216.57
7.4.100.0100.01016.66
7.4.90.0080.01116.55
7.4.80.0090.01519.39
7.4.70.0190.00016.56
7.4.60.0130.00416.53
7.4.50.0040.00016.48
7.4.40.0150.00316.47
7.4.30.0070.01416.50
7.4.00.0030.00715.21
7.3.330.0080.00013.32
7.3.320.0030.00313.47
7.3.310.0030.00316.46
7.3.300.0030.00316.47
7.3.290.0060.00916.47
7.3.280.0090.00816.46
7.3.270.0160.00317.40
7.3.260.0120.00616.61
7.3.250.0090.01516.46
7.3.240.0100.00716.61
7.3.230.0190.00316.46
7.3.210.0110.00716.43
7.3.200.0060.01516.50
7.3.190.0060.01216.63
7.3.180.0120.01216.57
7.3.170.0120.00616.54
7.3.160.0110.00516.41
7.2.330.0090.00916.69
7.2.320.0090.00916.50
7.2.310.0090.01016.61
7.2.300.0070.01016.54
7.2.290.0130.00616.60
7.2.00.0000.01419.63
7.1.100.0030.00617.72
7.1.70.0040.01216.87
7.1.60.0030.00717.41
7.1.50.0210.00316.96
7.1.00.0000.08022.25
7.0.200.0100.00716.75
7.0.140.0100.06722.21
7.0.60.0070.07319.75
7.0.50.0200.06717.85
7.0.40.0130.08020.32
7.0.30.0300.03020.23
7.0.20.0230.05020.12
7.0.10.0100.05320.19
7.0.00.0070.09020.29
5.6.280.0100.06721.04
5.6.210.0170.06020.44
5.6.200.0230.06718.33
5.6.190.0070.05020.55
5.6.180.0370.07320.55
5.6.170.0230.04720.45
5.6.160.0070.08320.55
5.6.150.0070.07318.17
5.6.140.0030.04318.13
5.6.130.0100.07718.17
5.6.120.0100.07321.02
5.6.110.0000.04721.08
5.6.100.0030.08321.09
5.6.90.0030.06021.00
5.6.80.0130.07320.38
5.5.350.0370.07020.44
5.5.340.0200.06717.96
5.5.330.0070.06320.41
5.5.320.0030.07320.27
5.5.310.0270.04720.26
5.5.300.0100.08017.91
5.5.290.0170.03718.05
5.5.280.0100.07320.99
5.5.270.0030.05720.73
5.5.260.0130.03320.77
5.5.250.0030.04020.79
5.5.240.0070.03320.24
5.4.450.0830.06719.64
5.4.440.0630.07319.55
5.4.430.1100.06019.58
5.4.420.0900.06019.58
5.4.410.0900.05719.48
5.4.400.0930.04718.99
5.4.390.0830.05718.72
5.4.380.1200.07718.63
5.4.370.1230.06318.80
5.4.360.0930.04718.77
5.4.350.0830.06318.72
5.4.340.0930.06018.55
5.4.320.1000.05718.54
5.4.310.0870.07318.47
5.4.300.1070.06318.55
5.4.290.1070.04318.74
5.4.280.1000.05018.58
5.4.270.1000.04718.71
5.4.260.0930.06018.52
5.4.250.1000.06318.75
5.4.240.1100.05318.52
5.4.230.0870.05318.79
5.4.220.0800.06018.57
5.4.210.0970.04718.74
5.4.200.0930.05716.82
5.4.190.0870.05718.59
5.4.180.0900.04718.78
5.4.170.0930.06018.59
5.4.160.1000.05718.61
5.4.150.1170.06718.80
5.4.140.0930.05716.52
5.4.130.1000.04016.46
5.4.120.0930.04316.29
5.4.110.0870.05316.50
5.4.100.0900.05016.31
5.4.90.0870.06316.46
5.4.80.0930.04316.26
5.4.70.1070.06716.34
5.4.60.0970.05316.26
5.4.50.1030.04316.24
5.4.40.0870.05016.41
5.4.30.0930.05016.43
5.4.20.1000.04016.32
5.4.10.0970.05316.18
5.4.00.0900.05715.69
5.3.290.0870.06314.91
5.3.280.0870.06014.64
5.3.270.1030.07014.75
5.3.260.1000.05314.68
5.3.250.1030.05014.87
5.3.240.1030.06714.62
5.3.230.1000.05314.66
5.3.220.1170.05314.70
5.3.210.0900.07014.76
5.3.200.0970.04314.61
5.3.190.1100.06314.63
5.3.180.1100.06314.68
5.3.170.0800.07014.64
5.3.160.1100.06314.58
5.3.150.1000.04714.77
5.3.140.1130.03314.63
5.3.130.0970.05714.62
5.3.120.1000.05314.59
5.3.110.0930.05714.62
5.3.100.0970.04714.07
5.3.90.0870.05314.17
5.3.80.0870.05014.21
5.3.70.1000.05014.06
5.3.60.0970.04314.17
5.3.50.0970.04714.04
5.3.40.0830.06014.02
5.3.30.1000.06714.05
5.3.20.0900.05013.94
5.3.10.0830.05313.71
5.3.00.1030.04313.78
5.2.170.0730.04311.22
5.2.160.0700.05311.24
5.2.150.0730.04011.22
5.2.140.0630.05011.15
5.2.130.0700.04011.20
5.2.120.0730.03711.11
5.2.110.0700.04011.17
5.2.100.0700.04011.23
5.2.90.0670.04311.35
5.2.80.0830.04011.22
5.2.70.0770.04311.23
5.2.60.0730.04711.11
5.2.50.0770.04011.06
5.2.40.0670.04011.05
5.2.30.0670.04711.04
5.2.20.0700.04311.20
5.2.10.0800.03710.98
5.2.00.0870.04310.77
5.1.60.0530.04310.21
5.1.50.0570.04010.04
5.1.40.0570.04010.12
5.1.30.0630.03710.46
5.1.20.0530.04310.38
5.1.10.0570.04310.12
5.1.00.0700.03010.13
5.0.50.0300.0278.77
5.0.40.0270.0308.51
5.0.30.0270.0438.29
5.0.20.0230.0308.17
5.0.10.0370.0308.33
5.0.00.0370.0578.27
4.4.90.0170.0335.92
4.4.80.0300.0305.98
4.4.70.0300.0175.89
4.4.60.0330.0235.86
4.4.50.0200.0235.89
4.4.40.0200.0405.95
4.4.30.0170.0235.86
4.4.20.0270.0276.09
4.4.10.0300.0205.97
4.4.00.0330.0406.01
4.3.110.0570.0275.91
4.3.100.0070.0275.81
4.3.90.0200.0305.82
4.3.80.0270.0375.79
4.3.70.0300.0205.77
4.3.60.0200.0335.78
4.3.50.0170.0235.78
4.3.40.0400.0405.79
4.3.30.0100.0304.61
4.3.20.0100.0274.59
4.3.10.0130.0274.51
4.3.00.0070.0239.38

preferences:
49.76 ms | 401 KiB | 5 Q