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) { $url = parse_url($path); $o = ''; if ($options & STREAM_USE_PATH) { $o .= ' STREAM_USE_PATH'; } if ($options & STREAM_IGNORE_URL) { $o .= ' STREAM_IGNORE_URL'; } /*if ($options & STREAM_ENFORCE_SAFE_MODE) { $o .= ' STREAM_ENFORCE_SAFE_MODE'; }*/ if ($options & STREAM_REPORT_ERRORS) { $o .= ' STREAM_REPORT_ERRORS'; } if ($options & STREAM_MUST_SEEK) { $o .= ' STREAM_MUST_SEEK'; } exit($url['host'] . $url['path'] . "\n" . $mode . "\n" . ltrim($o)); //$this->host = parse_url($path, PHP_URL_HOST); //$this->fileHandle = fopen($); 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.70.0120.00616.88
8.3.60.0110.00318.30
8.3.50.0100.01021.14
8.3.40.0140.00718.98
8.3.30.0110.00620.21
8.3.20.0050.00220.16
8.3.10.0050.00321.96
8.3.00.0040.00422.34
8.2.180.0070.01118.41
8.2.170.0040.01122.96
8.2.160.0110.00422.20
8.2.150.0070.00024.18
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0030.00520.82
8.2.110.0050.00522.18
8.2.100.0070.00417.91
8.2.90.0040.00419.09
8.2.80.0000.00819.28
8.2.70.0040.00417.63
8.2.60.0030.00518.04
8.2.50.0000.00818.07
8.2.40.0060.00319.95
8.2.30.0000.00719.46
8.2.20.0000.00817.64
8.2.10.0000.00717.76
8.2.00.0050.00317.80
8.1.280.0110.00425.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0090.00023.92
8.1.230.0040.00819.02
8.1.220.0050.00317.77
8.1.210.0000.00818.77
8.1.200.0040.00417.36
8.1.190.0000.00817.66
8.1.180.0030.00519.07
8.1.170.0040.00418.68
8.1.160.0070.00018.95
8.1.150.0070.00018.64
8.1.140.0000.00717.47
8.1.130.0000.00717.78
8.1.120.0040.00417.55
8.1.110.0000.00917.54
8.1.100.0040.00417.45
8.1.90.0070.00317.50
8.1.80.0000.00717.46
8.1.70.0040.00417.38
8.1.60.0030.00517.58
8.1.50.0040.00417.44
8.1.40.0000.00817.49
8.1.30.0040.00417.64
8.1.20.0030.00517.64
8.1.10.0030.00617.58
8.1.00.0030.00617.52
8.0.300.0050.00318.77
8.0.290.0070.00017.18
8.0.280.0080.00018.53
8.0.270.0000.00817.41
8.0.260.0030.00316.97
8.0.250.0000.00717.00
8.0.240.0000.00817.05
8.0.230.0000.00716.99
8.0.220.0000.00716.94
8.0.210.0030.00317.07
8.0.200.0040.00417.12
8.0.190.0000.00717.00
8.0.180.0000.00717.09
8.0.170.0040.00417.02
8.0.160.0000.00816.95
8.0.150.0030.00317.00
8.0.140.0000.00817.00
8.0.130.0060.00013.53
8.0.120.0000.00716.90
8.0.110.0050.00216.85
8.0.100.0080.00017.05
8.0.90.0000.00716.89
8.0.80.0100.00717.08
8.0.70.0030.00517.03
8.0.60.0040.00417.08
8.0.50.0040.00417.07
8.0.30.0070.01117.17
8.0.20.0070.01117.40
8.0.10.0080.00017.05
8.0.00.0080.01016.95
7.4.330.0030.00315.20
7.4.320.0040.00416.67
7.4.300.0060.00016.60
7.4.290.0000.00716.47
7.4.280.0030.00316.55
7.4.270.0020.00516.58
7.4.260.0000.00813.29
7.4.250.0050.00316.60
7.4.240.0010.00716.54
7.4.230.0030.00316.32
7.4.220.0130.00316.67
7.4.210.0120.00716.57
7.4.200.0000.00816.73
7.4.190.0050.00216.77
7.4.160.0040.01216.55
7.4.150.0060.01217.40
7.4.140.0080.00917.86
7.4.130.0090.01116.50
7.4.120.0110.00316.56
7.4.110.0150.00316.52
7.4.100.0170.00016.39
7.4.90.0110.00716.67
7.4.80.0070.01019.39
7.4.70.0070.01016.61
7.4.60.0070.01016.55
7.4.50.0080.00016.73
7.4.40.0070.01022.77
7.4.30.0110.00816.48
7.4.00.0000.01114.82
7.3.330.0050.00013.54
7.3.320.0060.00013.33
7.3.310.0050.00216.50
7.3.300.0030.00316.47
7.3.290.0040.01216.37
7.3.280.0100.00816.42
7.3.270.0110.00817.40
7.3.260.0090.01516.53
7.3.250.0140.00816.46
7.3.240.0040.01416.63
7.3.230.0110.00616.40
7.3.210.0090.00916.58
7.3.200.0090.01219.39
7.3.190.0090.00816.59
7.3.180.0060.00916.42
7.3.170.0120.00316.54
7.3.160.0090.00916.48
7.3.120.0030.01414.73
7.3.10.0120.00316.32
7.3.00.0040.00816.71
7.2.330.0100.01016.37
7.2.320.0140.00316.71
7.2.310.0030.01316.41
7.2.300.0070.01016.48
7.2.290.0100.00716.62
7.2.130.0120.00616.70
7.2.120.0100.00316.85
7.2.110.0160.00316.82
7.2.100.0110.00416.95
7.2.90.0130.00016.92
7.2.80.0070.00716.86
7.2.70.0060.01016.87
7.2.60.0120.00316.92
7.2.50.0030.01316.72
7.2.40.0030.01016.60
7.2.30.0070.00716.75
7.2.20.0130.00316.78
7.2.10.0000.01216.95
7.2.00.0070.00417.94
7.1.250.0030.01015.78
7.1.240.0000.01615.93
7.1.230.0080.00415.93
7.1.220.0090.00615.78
7.1.210.0060.00915.65
7.1.200.0040.00615.87
7.1.190.0070.00715.89
7.1.180.0060.00915.35
7.1.170.0110.00415.52
7.1.160.0110.00315.73
7.1.150.0130.00315.81
7.1.140.0050.00515.66
7.1.130.0080.00415.91
7.1.120.0080.00615.88
7.1.110.0040.00715.88
7.1.100.0060.00617.03
7.1.90.0030.01015.66
7.1.80.0060.00615.68
7.1.70.0030.00716.36
7.1.60.0050.01117.39
7.1.50.0020.01516.37
7.1.40.0160.00315.93
7.1.30.0100.00315.91
7.1.20.0090.00615.72
7.1.10.0030.00615.92
7.1.00.0030.03819.04
7.0.330.0070.00715.39
7.0.320.0110.00414.97
7.0.310.0070.00315.03
7.0.300.0080.00415.30
7.0.290.0040.00715.01
7.0.280.0030.00615.18
7.0.270.0030.00915.25
7.0.260.0070.00715.09
7.0.250.0100.00315.36
7.0.240.0040.00815.34
7.0.230.0000.01015.30
7.0.220.0070.00315.30
7.0.210.0040.00415.28
7.0.200.0050.01016.06
7.0.190.0030.00515.36
7.0.180.0060.00915.25
7.0.170.0070.00715.52
7.0.160.0080.00015.41
7.0.150.0030.00615.28
7.0.140.0060.03818.84
7.0.130.0120.00315.34
7.0.120.0030.01015.28
7.0.110.0000.00915.52
7.0.100.0130.02817.62
7.0.90.0070.03717.48
7.0.80.0110.04217.62
7.0.70.0070.02717.63
7.0.60.0080.03317.68
7.0.50.0080.02517.88
7.0.40.0070.04116.73
7.0.30.0050.04516.81
7.0.20.0020.02816.69
7.0.10.0050.02416.78
7.0.00.0030.02716.62
5.6.380.0040.00714.42
5.6.370.0000.00914.09
5.6.360.0030.00913.82
5.6.350.0030.01014.04
5.6.340.0030.01414.21
5.6.330.0090.00614.55
5.6.320.0060.00914.43
5.6.310.0100.00014.46
5.6.300.0100.00314.23
5.6.290.0080.00513.94
5.6.280.0040.03717.45
5.6.270.0060.00614.06
5.6.260.0030.01014.32
5.6.250.0130.02217.45
5.6.240.0080.04317.29
5.6.230.0030.03917.41
5.6.220.0030.02717.36
5.6.210.0100.04017.61
5.6.200.0050.03317.64
5.6.190.0050.02417.72
5.6.180.0030.04417.54
5.6.170.0050.03517.78
5.6.160.0110.03317.77
5.6.150.0030.04217.58
5.6.140.0070.02517.72
5.6.130.0050.02517.66
5.6.120.0050.03517.76
5.6.110.0020.04917.58
5.6.100.0100.03817.74
5.6.90.0030.03217.72
5.6.80.0080.04117.20
5.6.70.0090.02917.29
5.6.60.0090.04417.33
5.6.50.0100.03917.26
5.6.40.0070.04117.41
5.6.30.0040.04717.41
5.6.20.0030.03217.45
5.6.10.0050.04917.22
5.6.00.0090.04017.29
5.5.380.0020.02715.70
5.5.370.0070.02515.76
5.5.360.0080.04015.78
5.5.350.0110.04115.82
5.5.340.0030.03415.83
5.5.330.0080.04015.90
5.5.320.0020.03316.01
5.5.310.0050.03316.04
5.5.300.0070.03715.86
5.5.290.0110.02115.87
5.5.280.0060.02615.95
5.5.270.0050.04716.04
5.5.260.0070.03115.79
5.5.250.0070.04015.86
5.5.240.0070.03115.71
5.5.230.0090.04115.72
5.5.220.0070.04015.77
5.5.210.0050.03615.44
5.5.200.0050.02515.44
5.5.190.0140.03215.73
5.5.180.0090.02615.63
5.5.170.0050.00510.99
5.5.160.0070.04315.53
5.5.150.0030.03915.72
5.5.140.0050.04315.66
5.5.130.0100.03315.58
5.5.120.0030.04015.56
5.5.110.0020.02815.77
5.5.100.0060.03915.67
5.5.90.0100.03115.61
5.5.80.0050.03215.48
5.5.70.0110.04015.60
5.5.60.0040.02515.39
5.5.50.0120.03715.46
5.5.40.0120.02815.63
5.5.30.0070.04515.39
5.5.20.0040.04015.43
5.5.10.0090.03715.63
5.5.00.0080.03115.54
5.4.450.0080.02615.23
5.4.440.0100.03815.11
5.4.430.0140.03414.95
5.4.420.0080.04015.22
5.4.410.0030.03815.04
5.4.400.0050.04215.10
5.4.390.0070.02715.01
5.4.380.0070.04015.09
5.4.370.0050.04714.94
5.4.360.0030.04414.90
5.4.350.0080.03814.79
5.4.340.0070.03514.85
5.4.330.0060.00610.63
5.4.320.0030.03115.08
5.4.310.0090.02714.95
5.4.300.0080.03815.20
5.4.290.0030.04414.96
5.4.280.0100.03815.26
5.4.270.0080.02815.23
5.4.260.0090.03315.20
5.4.250.0110.02814.95
5.4.240.0070.03715.14
5.4.230.0050.04215.03
5.4.220.0050.03615.09
5.4.210.0100.03215.12
5.4.200.0110.03514.87
5.4.190.0050.03814.98
5.4.180.0060.02714.93
5.4.170.0100.03515.12
5.4.160.0090.03014.96
5.4.150.0080.03314.81
5.4.140.0050.04013.65
5.4.130.0050.04313.72
5.4.120.0050.03713.68
5.4.110.0010.03613.63
5.4.100.0030.02513.80
5.4.90.0070.03013.79
5.4.80.0090.03513.62
5.4.70.0020.02813.52
5.4.60.0020.03013.68
5.4.50.0030.02513.78
5.4.40.0070.03313.81
5.4.30.0080.03813.63
5.4.20.0090.03613.75
5.4.10.0160.01313.66
5.4.00.0060.03913.33
5.3.290.0030.04512.60
5.3.280.0020.02412.66
5.3.270.0080.02012.54
5.3.260.0050.03312.63
5.3.250.0030.04212.71
5.3.240.0070.04112.55
5.3.230.0020.03412.63
5.3.220.0060.03012.58
5.3.210.0050.03712.51
5.3.200.0080.02112.40
5.3.190.0030.04512.45
5.3.180.0060.03112.68
5.3.170.0120.03512.56
5.3.160.0020.02812.72
5.3.150.0050.03312.62
5.3.140.0050.04012.51
5.3.130.0070.02212.38
5.3.120.0030.03712.48
5.3.110.0080.04012.68
5.3.100.0030.03712.28
5.3.90.0050.02812.39
5.3.80.0020.04312.31
5.3.70.0030.04012.28
5.3.60.0050.02212.25
5.3.50.0050.03012.34
5.3.40.0070.02812.21
5.3.30.0030.03312.22
5.3.20.0050.03212.16
5.3.10.0050.03911.96
5.3.00.0030.03612.02
5.2.170.0030.03510.98
5.2.160.0060.02510.98
5.2.150.0020.02010.99
5.2.140.0050.03310.96
5.2.130.0040.02810.92
5.2.120.0070.02710.92
5.2.110.0030.02510.94
5.2.100.0060.01710.93
5.2.90.0030.03210.76
5.2.80.0110.03010.87
5.2.70.0040.02110.88
5.2.60.0030.02310.86
5.2.50.0040.02910.94
5.2.40.0050.01710.88
5.2.30.0020.01910.88
5.2.20.0050.01510.89
5.2.10.0030.03210.75
5.2.00.0020.03710.76
5.1.60.0000.01710.46
5.1.50.0040.01510.42
5.1.40.0030.02110.48
5.1.30.0020.03310.40
5.1.20.0000.02010.49
5.1.10.0030.01510.49
5.1.00.0010.02010.41
5.0.50.0050.02010.00
5.0.40.0070.01810.00
5.0.30.0030.03110.00
5.0.20.0030.02410.00
5.0.10.0020.01810.00
5.0.00.0030.02010.00
4.4.90.0020.01610.00
4.4.80.0030.01010.00
4.4.70.0030.01710.00
4.4.60.0010.02010.00
4.4.50.0020.02010.00
4.4.40.0030.02210.00
4.4.30.0020.01710.00
4.4.20.0030.01310.00
4.4.10.0020.01510.00
4.4.00.0060.01310.00
4.3.110.0010.01110.00
4.3.100.0020.02010.00
4.3.90.0000.01910.00
4.3.80.0040.02710.00
4.3.70.0020.01610.00
4.3.60.0000.01210.00
4.3.50.0030.01010.00
4.3.40.0010.02110.00
4.3.30.0000.01810.00
4.3.20.0020.01810.00
4.3.10.0000.01910.00
4.3.00.0010.01510.00

preferences:
39.23 ms | 401 KiB | 5 Q