3v4l.org

run code in 300+ PHP versions simultaneously
<?php class PosixStream { private $fileHandle = null; private $host; private $position = 0; public function stream_open($path, $mode, $options, &$opened_path) { exit(parse_url($path, PHP_URL_HOST) . "\n" . $mode . "\n" . $options . "\n" . $opened_path); //$this->host = parse_url($path, PHP_URL_HOST); //$this->fileHandle = fopen($); return true; } public function stream_read($count) { return ''; } public function stream_write($data) { return 0; } public function stream_tell() { return 0; } public function stream_eof() { true; } public function stream_seek($offset, $whence = SEEK_SET) { return false; } public function stream_metadata($path, $option, $value) { exit($path . "\n" . $option . "\n" . $value); return false; } } stream_wrapper_register('steve', 'PosixStream'); $test = fopen('steve://t/e/test.txt', 'r+'); fclose($test);

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.0150.00316.63
8.3.50.0120.00721.92
8.3.40.0110.00418.75
8.3.30.0120.00318.96
8.3.20.0080.00020.34
8.3.10.0040.00423.48
8.3.00.0060.00317.64
8.2.180.0040.01216.75
8.2.170.0110.00422.96
8.2.160.0100.00320.58
8.2.150.0030.00624.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0080.00019.23
8.2.110.0100.01621.00
8.2.100.0120.00017.84
8.2.90.0000.00819.17
8.2.80.0080.00017.97
8.2.70.0040.00417.50
8.2.60.0000.00817.92
8.2.50.0060.00318.10
8.2.40.0000.00820.42
8.2.30.0040.00419.09
8.2.20.0000.00717.78
8.2.10.0080.00018.09
8.2.00.0000.00717.76
8.1.280.0120.00325.92
8.1.270.0070.01322.12
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0000.00923.84
8.1.230.0040.00717.83
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.23
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0080.00018.64
8.1.160.0050.00318.89
8.1.150.0000.00720.11
8.1.140.0050.00317.34
8.1.130.0030.00317.79
8.1.120.0030.00617.38
8.1.110.0000.00817.45
8.1.100.0040.00417.45
8.1.90.0030.00317.27
8.1.80.0080.00017.43
8.1.70.0050.00217.41
8.1.60.0040.00417.57
8.1.50.0040.00417.40
8.1.40.0040.00417.49
8.1.30.0080.00017.61
8.1.20.0040.00417.62
8.1.10.0040.00417.43
8.1.00.0030.00517.38
8.0.300.0040.00418.77
8.0.290.0050.00316.75
8.0.280.0070.00018.46
8.0.270.0000.00717.19
8.0.260.0030.00317.34
8.0.250.0000.00717.11
8.0.240.0070.00317.13
8.0.230.0000.00716.91
8.0.220.0030.00316.87
8.0.210.0030.00316.88
8.0.200.0040.00417.02
8.0.190.0030.00317.05
8.0.180.0020.00516.99
8.0.170.0050.00316.90
8.0.160.0070.00016.93
8.0.150.0030.00516.95
8.0.140.0000.00716.91
8.0.130.0030.00313.36
8.0.120.0000.00816.83
8.0.110.0000.00716.99
8.0.100.0070.00016.85
8.0.90.0000.00716.85
8.0.80.0110.01116.95
8.0.70.0070.00017.04
8.0.60.0000.00717.00
8.0.50.0030.00616.87
8.0.30.0100.01517.20
8.0.20.0100.00917.40
8.0.10.0000.00816.86
8.0.00.0070.01016.66
7.4.330.0050.00015.02
7.4.320.0070.00016.39
7.4.300.0030.00316.45
7.4.290.0070.00016.52
7.4.280.0080.00016.44
7.4.270.0030.00316.37
7.4.260.0030.00316.58
7.4.250.0000.00816.54
7.4.240.0020.00516.47
7.4.230.0000.00716.49
7.4.220.0060.01216.45
7.4.210.0070.01316.52
7.4.200.0070.00016.55
7.4.160.0040.01116.52
7.4.150.0110.01117.40
7.4.140.0100.01417.86
7.4.130.0110.00716.50
7.4.120.0120.00816.57
7.4.110.0110.01116.67
7.4.100.0040.01716.32
7.4.90.0090.00916.38
7.4.80.0070.01319.39
7.4.70.0090.01216.51
7.4.60.0160.00616.58
7.4.50.0000.00816.43
7.4.40.0070.01016.66
7.4.30.0100.00616.63
7.4.00.0060.01314.74
7.3.330.0060.00013.27
7.3.320.0030.00313.19
7.3.310.0000.00716.41
7.3.300.0050.00216.40
7.3.290.0000.01516.36
7.3.280.0070.01116.38
7.3.270.0160.00017.40
7.3.260.0190.00416.63
7.3.250.0090.00816.53
7.3.240.0100.01116.56
7.3.230.0030.01816.50
7.3.210.0080.00816.41
7.3.200.0100.00619.39
7.3.190.0110.01416.34
7.3.180.0000.01516.52
7.3.170.0130.00316.53
7.3.160.0100.01016.40
7.3.120.0030.01414.89
7.3.110.0000.01314.84
7.3.100.0140.00014.47
7.3.90.0080.00815.11
7.3.80.0090.00614.75
7.3.70.0060.01314.83
7.3.60.0100.00314.90
7.3.50.0040.00814.71
7.3.40.0110.00714.69
7.3.30.0070.00714.77
7.3.20.0000.01716.73
7.3.10.0070.01016.66
7.3.00.0030.01016.82
7.2.330.0070.01116.50
7.2.320.0160.00016.37
7.2.310.0070.01016.40
7.2.300.0030.01316.46
7.2.290.0030.01416.66
7.2.250.0090.00614.77
7.2.240.0040.01214.92
7.2.230.0110.00415.19
7.2.220.0040.01115.11
7.2.210.0070.01014.80
7.2.200.0120.00614.81
7.2.190.0030.01214.90
7.2.180.0080.01115.12
7.2.170.0070.01114.69
7.2.160.0000.01415.02
7.2.150.0070.01016.86
7.2.140.0070.00716.85
7.2.130.0070.00716.71
7.2.120.0060.00616.66
7.2.110.0030.01517.01
7.2.100.0060.00616.82
7.2.90.0080.00316.82
7.2.80.0000.01317.08
7.2.70.0030.00916.77
7.2.60.0060.00916.82
7.2.50.0100.00716.91
7.2.40.0090.00616.37
7.2.30.0090.00616.80
7.2.20.0000.01416.93
7.2.10.0060.01016.58
7.2.00.0070.00716.90
7.1.330.0070.00715.91
7.1.320.0040.00815.47
7.1.310.0030.01515.48
7.1.300.0030.01315.76
7.1.290.0090.00315.67
7.1.280.0040.01115.75
7.1.270.0100.00015.63
7.1.260.0040.01115.56
7.1.250.0090.00615.91
7.1.200.0100.00315.81
7.1.70.0030.00616.83
7.1.60.0100.01319.70
7.1.50.0000.01616.86
7.1.00.0030.07322.54
7.0.200.0040.00416.79
7.0.140.0100.06722.16
7.0.60.0070.08019.96
7.0.50.0000.08717.88
7.0.40.0100.08020.05
7.0.30.0570.04320.21
7.0.20.0170.04320.09
7.0.10.0170.07020.05
7.0.00.0100.08720.25
5.6.280.0070.07020.92
5.6.210.0200.07020.51
5.6.200.0070.07718.14
5.6.190.0030.09320.67
5.6.180.0230.05320.64
5.6.170.0230.08020.54
5.6.160.0070.05720.71
5.6.150.0030.07318.18
5.6.140.0130.07318.15
5.6.130.0030.06018.21
5.6.120.0130.08320.95
5.6.110.0030.04321.00
5.6.100.0000.06021.00
5.6.90.0270.07721.11
5.6.80.0100.04720.39
5.6.70.4300.03720.53
5.5.350.0100.08020.39
5.5.340.0070.06017.95
5.5.330.0200.04020.56
5.5.320.0200.04720.35
5.5.310.0170.04720.23
5.5.300.0000.05318.01
5.5.290.0100.04717.98
5.5.280.0000.05320.90
5.5.270.0070.04720.77
5.5.260.0070.03720.77
5.5.250.0100.07720.60
5.5.240.0030.06320.05
5.4.450.0900.03719.49
5.4.440.2170.04319.54
5.4.430.1830.04019.30
5.4.420.1800.03719.32
5.4.410.1770.03319.07
5.4.400.1700.04019.22
5.4.390.1730.03319.09
5.4.380.2070.04019.00
5.4.370.2100.04019.22
5.4.360.1930.04319.09
5.4.350.1730.03319.02
5.4.340.1700.04019.09
5.4.320.1830.04718.98
5.4.310.1000.03319.31
5.4.300.1700.03719.09
5.4.290.1730.04018.98
5.4.280.0070.03719.16
5.4.270.0070.04019.18
5.4.260.0630.04319.16
5.4.250.1070.05319.13
5.4.240.1500.03319.13
5.4.230.0900.04319.16
5.4.220.1830.04019.21
5.4.210.1770.04319.29
5.4.200.1630.03719.08
5.4.190.0230.03719.15
5.4.180.0430.05718.93
5.4.170.0030.04018.94
5.4.160.0030.06719.05
5.4.150.0100.03719.07
5.4.140.0030.04316.50
5.4.130.0030.03316.30
5.4.120.0030.03716.50
5.4.110.0170.07016.52
5.4.100.0030.06716.58
5.4.90.0030.04316.37
5.4.80.0030.06316.55
5.4.70.0130.06016.43
5.4.60.0130.04016.36
5.4.50.0170.04316.17
5.4.40.0170.06016.27
5.4.30.0130.05716.52
5.4.20.0200.04316.43
5.4.10.0200.05316.43
5.4.00.0300.03715.73
5.3.290.0270.07314.75
5.3.280.0230.05714.65
5.3.270.0230.06314.59
5.3.260.0200.04014.62
5.3.250.0200.05014.59
5.3.240.0200.07014.70
5.3.230.0230.03714.68
5.3.220.0300.03714.66
5.3.210.0200.05014.58
5.3.200.0130.05714.58
5.3.190.0230.03314.65
5.3.180.0230.06714.68
5.3.170.0300.04014.49
5.3.160.0170.03714.54
5.3.150.0430.05014.63
5.3.140.0400.06314.54
5.3.130.0270.08314.57
5.3.120.0470.06314.57
5.3.110.0200.04014.79
5.3.100.0130.06713.97
5.3.90.0170.07314.25
5.3.80.0370.04014.04
5.3.70.0230.03014.04
5.3.60.0130.04014.03
5.3.50.0400.03713.87
5.3.40.0270.06014.11
5.3.30.0100.05013.84
5.3.20.0200.05313.86
5.3.10.0230.03013.67
5.3.00.0270.03013.66
5.2.170.0130.03011.11
5.2.160.0100.03311.08
5.2.150.0130.03011.21
5.2.140.0170.06311.07
5.2.130.0230.05311.04
5.2.120.0230.03311.04
5.2.110.0170.05311.26
5.2.100.0200.04011.26
5.2.90.0130.05311.07
5.2.80.0130.05711.20
5.2.70.0170.05711.02
5.2.60.0370.03011.20
5.2.50.0130.02710.96
5.2.40.0170.05310.96
5.2.30.0130.04711.20
5.2.20.0100.04011.02
5.2.10.0130.04310.85
5.2.00.0230.04010.70
5.1.60.0230.03710.13
5.1.50.0130.0539.91
5.1.40.0130.03010.21
5.1.30.0130.05710.36
5.1.20.0170.02710.34
5.1.10.0100.0309.98
5.1.00.0070.03010.09
5.0.50.0100.0438.61
5.0.40.0030.0208.30
5.0.30.0070.0608.22
5.0.20.0100.0378.19
5.0.10.0100.0278.24
5.0.00.0030.0308.07
4.4.90.0030.0177.95
4.4.80.0030.0177.95
4.4.70.0100.0207.95
4.4.60.0070.0207.95
4.4.50.0030.0177.95
4.4.40.0070.0307.95
4.4.30.0070.0207.95
4.4.20.0070.0177.95
4.4.10.0070.0207.95
4.4.00.0070.0307.95
4.3.110.0100.0237.95
4.3.100.0030.0207.95
4.3.90.0100.0107.95
4.3.80.0030.0277.95
4.3.70.0100.0137.95
4.3.60.0070.0277.95
4.3.50.0000.0377.95
4.3.40.0030.0277.95
4.3.30.0000.0237.95
4.3.20.0000.0377.95
4.3.10.0030.0237.95
4.3.00.0100.0137.95

preferences:
53.44 ms | 400 KiB | 5 Q