3v4l.org

run code in 300+ PHP versions simultaneously
<?php class VariableStream { var $position; var $varname; function stream_open($path, $mode, $options, &$opened_path) { echo "opening\n"; $url = parse_url($path); $this->varname = $url["host"]; $this->position = 0; return true; } function stream_read($count) { echo "reading\n"; $ret = substr($GLOBALS[$this->varname], $this->position, $count); $this->position += strlen($ret); return $ret; } function stream_eof() { echo "eoffing\n"; return $this->position >= strlen($GLOBALS[$this->varname]); } function stream_stat() { echo "stating\n"; $time = time(); return array( 0, // device number 0, // inode number 0, // inode protection mode 0, // number of links 0, // userid of owner 0, // groupid of owner 0, // device type, if inode device strlen($GLOBALS[$this->varname]), // size in bytes $time, // atime - time of last access $time, // mtime - time of last modification $time, // ctime - time of creation -1, // block size of filesystem I/O -1 // number of 512-byte blocks allocated ); } } stream_wrapper_register("var", "VariableStream"); $myvar = "fooey"; $v = include 'var://myvar'; var_dump($v);

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)
7.4.00.0030.01415.12
7.3.120.0050.01314.85
7.3.110.0040.01414.70
7.3.100.0040.01114.74
7.3.90.0060.01014.81
7.3.80.0050.00814.87
7.3.70.0020.01114.77
7.3.60.0050.00614.76
7.3.50.0050.00614.81
7.3.40.0060.00814.72
7.3.30.0090.00614.84
7.3.20.0090.00316.75
7.3.10.0060.00816.75
7.3.00.0050.00916.60
7.2.250.0090.00715.25
7.2.240.0020.01615.09
7.2.230.0040.01115.21
7.2.220.0080.00315.01
7.2.210.0070.00615.26
7.2.200.0060.00815.16
7.2.190.0050.01015.06
7.2.180.0030.01115.03
7.2.170.0140.00315.14
7.2.160.0060.01015.23
7.2.150.0090.00916.91
7.2.140.0070.00717.06
7.2.130.0000.01616.95
7.2.120.0070.00716.73
7.2.110.0070.01117.14
7.2.100.0030.01316.98
7.2.90.0060.00616.93
7.2.80.0090.00617.11
7.2.70.0080.00817.13
7.2.60.0070.00816.91
7.2.50.0090.00316.95
7.2.40.0070.00716.84
7.2.30.0030.01316.94
7.2.20.0030.01216.79
7.2.10.0030.01316.95
7.2.00.0070.00718.09
7.1.330.0080.00615.57
7.1.320.0070.00715.95
7.1.310.0060.00615.89
7.1.300.0060.00615.75
7.1.290.0110.00215.79
7.1.280.0030.00815.95
7.1.270.0050.00615.80
7.1.260.0050.00815.80
7.1.250.0030.01315.79
7.1.200.0080.00415.67
7.1.100.0080.00418.06
7.1.70.0030.00717.18
7.1.60.0070.01719.32
7.1.50.0000.02016.93
7.1.00.0030.07722.32
7.0.200.2960.00314.76
7.0.140.0070.07022.18
7.0.100.0030.06720.03
7.0.90.0330.04720.17
7.0.80.0030.07720.05
7.0.70.0230.05320.03
7.0.60.0070.06720.05
7.0.50.0070.06020.20
7.0.40.0070.05720.04
7.0.30.0130.04719.96
7.0.20.0130.07020.18
7.0.10.0100.08720.04
7.0.00.0000.09020.13
5.6.280.0030.07321.06
5.6.250.0000.06020.61
5.6.240.0030.04320.71
5.6.230.0070.06320.63
5.6.220.0070.04020.59
5.6.210.0000.05320.59
5.6.200.0000.08720.95
5.6.190.0100.07321.03
5.6.180.0100.05020.95
5.6.170.0070.07320.95
5.6.160.0070.03320.95
5.6.150.0000.06721.09
5.6.140.0100.07721.06
5.6.130.0070.04321.06
5.6.120.0000.08020.95
5.6.110.0070.06321.05
5.6.100.0000.08320.95
5.6.90.0000.08720.93
5.6.80.0030.05720.51
5.6.70.0000.05720.50
5.6.60.0130.03320.33
5.6.50.0100.03020.48
5.6.40.0030.06720.38
5.6.30.0070.03320.54
5.6.20.0030.04020.46
5.6.10.0030.04020.41
5.6.00.0070.04720.37
5.5.380.0130.06320.52
5.5.370.0030.07020.57
5.5.360.0130.05020.37
5.5.350.0100.06020.38
5.5.340.0070.08020.92
5.5.330.0130.06320.93
5.5.320.0130.08320.94
5.5.310.0070.03720.92
5.5.300.0100.06320.91
5.5.290.0030.04320.89
5.5.280.0030.04320.91
5.5.270.0070.07320.77
5.5.260.0000.07720.77
5.5.250.0070.03320.57
5.5.240.0030.04320.28
5.5.230.0070.05720.02
5.5.220.0000.08020.29
5.5.210.0130.07320.26
5.5.200.0130.06720.25
5.5.190.0000.04020.28
5.5.180.0030.06720.22
5.5.160.0070.03320.27
5.5.150.0100.03720.22
5.5.140.0030.03320.16
5.5.130.0170.03020.27
5.5.120.0030.06020.14
5.5.110.0100.03020.13
5.5.100.0070.04020.13
5.5.90.0030.04719.93
5.5.80.0130.06720.05
5.5.70.0030.06320.05
5.5.60.0070.05720.09
5.5.50.0100.06320.15
5.5.40.0100.03320.06
5.5.30.0070.05020.00
5.5.20.0100.07019.93
5.5.10.0000.08720.02
5.5.00.0030.05320.03
5.4.450.0100.04019.36
5.4.440.0100.07019.53
5.4.430.0030.06019.22
5.4.420.0100.03319.23
5.4.410.0000.08719.40
5.4.400.0070.07319.17
5.4.390.0100.04019.12
5.4.380.0030.08319.04
5.4.370.0100.07318.88
5.4.360.0030.07719.16
5.4.350.0100.02719.16
5.4.340.0070.05319.18
5.4.320.0100.03718.87
5.4.310.0000.09019.14
5.4.300.0100.07019.02
5.4.290.0200.06318.90
5.4.280.0130.03019.15
5.4.270.0100.05719.21
5.4.260.0030.04018.95
5.4.250.0030.05719.09
5.4.240.0100.03019.12
5.4.230.0130.06019.17
5.4.220.0030.03318.91
5.4.210.0030.03719.23
5.4.200.0030.04719.02
5.4.190.0000.03718.89
5.4.180.0130.06719.24
5.4.170.0000.04319.08
5.4.160.0070.07719.01
5.4.150.0030.08319.16
5.4.140.0000.05316.43
5.4.130.0000.06716.41
5.4.120.0030.06316.41
5.4.110.0130.06716.36
5.4.100.0030.06316.39
5.4.90.0070.04016.37
5.4.80.0030.03016.36
5.4.70.0070.07716.35
5.4.60.0070.07316.34
5.4.50.0070.06716.44
5.4.40.0070.07016.49
5.4.30.0100.06716.33
5.4.20.0070.06016.47
5.4.10.0000.04716.41
5.4.00.0070.03015.86
5.3.290.0030.08014.67
5.3.280.0130.04014.68
5.3.270.0000.08714.55
5.3.260.0000.06014.74
5.3.250.0070.07014.68
5.3.240.0070.03314.65
5.3.230.0070.05714.57
5.3.220.0100.06714.70
5.3.210.0070.05714.72
5.3.200.0030.07014.73
5.3.190.0030.04014.72
5.3.180.0000.04014.55
5.3.170.0000.03714.72
5.3.160.0070.07014.50
5.3.150.0100.05714.61
5.3.140.0070.03714.50
5.3.130.0100.07714.50
5.3.120.0030.03314.69
5.3.110.0070.05014.69
5.3.100.0100.05314.15
5.3.90.0030.03714.04
5.3.80.0070.06713.92
5.3.70.0070.07714.07
5.3.60.0170.02314.13
5.3.50.0030.03313.95
5.3.40.0070.05314.01
5.3.30.0170.05013.84
5.3.20.0030.04713.80
5.3.10.0030.03713.60
5.3.00.0030.05713.80
5.2.170.0100.05311.60
5.2.160.0070.02711.60
5.2.150.0000.04311.60
5.2.140.0030.02711.60
5.2.130.0000.03311.60
5.2.120.0070.02311.60
5.2.110.0000.06711.60
5.2.100.0100.05711.60
5.2.90.0070.03711.60
5.2.80.0070.05311.60
5.2.70.0030.07011.60
5.2.60.0030.04311.60
5.2.50.0100.06011.60
5.2.40.0070.04711.60
5.2.30.0000.02711.60
5.2.20.0100.02311.60
5.2.10.0030.05011.60
5.2.00.0030.02711.60
5.1.60.0000.02311.60
5.1.50.0070.02011.60
5.1.40.0000.04011.60
5.1.30.0070.02311.60
5.1.20.0030.05711.60
5.1.10.0030.02711.60
5.1.00.0030.05311.60
5.0.50.0030.03311.60
5.0.40.0000.03311.60
5.0.30.0000.06011.60
5.0.20.0000.03011.60
5.0.10.0030.03011.60
5.0.00.0030.04011.60
4.4.90.0030.02311.60
4.4.80.0000.02011.60
4.4.70.0000.02711.60
4.4.60.0000.03011.60
4.4.50.0000.02011.60
4.4.40.0000.02311.60
4.4.30.0000.01311.60
4.4.20.0000.01711.60
4.4.10.0000.01311.60
4.4.00.0030.02011.60
4.3.110.0000.01311.60
4.3.100.0000.03711.60
4.3.90.0000.02011.60
4.3.80.0000.04011.60
4.3.70.0030.02711.60
4.3.60.0070.02011.60
4.3.50.0000.01311.60
4.3.40.0000.02011.60
4.3.30.0000.03311.60
4.3.20.0070.02311.60
4.3.10.0000.01711.60
4.3.00.0030.02311.60

preferences:
40.67 ms | 401 KiB | 5 Q