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.0060.01215.00
7.3.120.0030.01015.04
7.3.110.0070.00715.14
7.3.100.0030.01214.85
7.3.90.0070.00714.75
7.3.80.0030.00915.19
7.3.70.0060.00914.90
7.3.60.0120.00314.98
7.3.50.0100.00314.58
7.3.40.0060.00914.91
7.3.30.0090.00014.86
7.3.20.0120.00316.73
7.3.10.0060.00916.63
7.3.00.0080.00416.72
7.2.250.0110.00715.16
7.2.240.0070.01315.35
7.2.230.0030.01015.23
7.2.220.0050.00814.93
7.2.210.0090.00615.25
7.2.200.0060.01015.15
7.2.190.0060.00915.18
7.2.180.0000.01415.01
7.2.170.0060.01015.17
7.2.00.0030.00919.63
7.1.330.0110.00415.95
7.1.320.0060.00615.76
7.1.310.0080.00615.90
7.1.300.0110.00016.00
7.1.290.0070.00715.80
7.1.280.0030.01015.59
7.1.270.0030.00615.89
7.1.260.0000.01215.77
7.1.100.0000.01118.02
7.1.70.0000.00717.31
7.1.60.0120.01219.32
7.1.50.0110.01116.93
7.1.00.0030.07722.48
7.0.200.0890.01014.94
7.0.140.0100.06022.00
7.0.80.0630.08319.88
7.0.70.0530.07720.03
7.0.60.0230.07319.98
7.0.50.0470.06720.19
7.0.40.0130.08020.08
7.0.30.0100.07720.14
7.0.20.0070.08320.18
7.0.10.0070.08720.16
7.0.00.0070.08320.03
5.6.280.0030.07320.82
5.6.230.0000.05020.69
5.6.220.0100.07720.48
5.6.210.0000.04720.54
5.6.200.0030.07720.97
5.6.190.0000.05721.00
5.6.180.0030.05021.04
5.6.170.0200.07021.02
5.6.160.0100.08321.15
5.6.150.0130.07721.18
5.6.140.0030.08321.02
5.6.130.0030.04721.06
5.6.120.0100.08320.94
5.6.110.0100.08021.06
5.6.100.0130.07721.00
5.6.90.0070.08321.01
5.6.80.0030.06020.44
5.6.70.0100.08320.39
5.6.60.0100.08020.49
5.6.50.0030.06720.53
5.6.40.0170.06720.34
5.6.30.0030.08020.32
5.6.20.0100.04320.37
5.6.10.0030.08320.32
5.6.00.0100.07020.30
5.5.370.0000.08320.36
5.5.360.0100.07720.56
5.5.350.0130.04720.43
5.5.340.0030.09320.90
5.5.330.0100.06720.87
5.5.320.0030.05320.89
5.5.310.0070.04320.80
5.5.300.0100.06720.89
5.5.290.0130.08320.84
5.5.280.0100.05720.93
5.5.270.0030.06320.76
5.5.260.0170.04020.75
5.5.250.0000.08720.62
5.5.240.0130.06020.17
5.5.230.0070.04720.16
5.5.220.0000.06320.30
5.5.210.0130.04020.31
5.5.200.0130.07020.20
5.5.190.0200.07320.21
5.5.180.0170.07020.15
5.5.160.0070.08320.16
5.5.150.0100.07720.18
5.5.140.0200.07019.99
5.5.130.0170.06720.22
5.5.120.0000.05320.19
5.5.110.0230.06020.18
5.5.100.0030.06320.08
5.5.90.0130.07319.96
5.5.80.0130.07320.08
5.5.70.0130.08020.04
5.5.60.0100.07320.06
5.5.50.0130.06720.14
5.5.40.0070.08020.03
5.5.30.0100.07019.96
5.5.20.0030.05720.04
5.5.10.0000.08320.07
5.5.00.0070.08020.02
5.4.450.0070.08719.20
5.4.440.0100.08019.46
5.4.430.0100.07719.51
5.4.420.0070.07719.48
5.4.410.0030.08319.32
5.4.400.0100.04318.89
5.4.390.0000.06319.04
5.4.380.0200.06319.14
5.4.370.0000.04718.90
5.4.360.0030.06319.04
5.4.350.0170.06318.88
5.4.340.0130.07019.14
5.4.320.0130.07319.14
5.4.310.0070.05019.06
5.4.300.0100.07719.14
5.4.290.0100.07019.12
5.4.280.0100.05318.87
5.4.270.0070.04718.90
5.4.260.0100.07719.12
5.4.250.0100.07719.04
5.4.240.0070.07019.04
5.4.230.0100.04719.04
5.4.220.0000.08019.20
5.4.210.0070.07318.84
5.4.200.0100.07018.85
5.4.190.0130.04719.14
5.4.180.0070.06019.20
5.4.170.0070.07319.17
5.4.160.0100.07019.12
5.4.150.0070.07318.83
5.4.140.0100.07316.21
5.4.130.0030.07016.20
5.4.120.0070.04016.41
5.4.110.0130.06716.55
5.4.100.0130.06716.49
5.4.90.0070.05316.51
5.4.80.0100.07016.50
5.4.70.0030.07316.32
5.4.60.0070.07016.32
5.4.50.0170.05716.43
5.4.40.0000.08016.39
5.4.30.0100.06316.47
5.4.20.0070.06716.47
5.4.10.0070.05316.43
5.4.00.0070.04015.87
5.3.290.0170.06714.61
5.3.280.0070.07314.63
5.3.270.0100.05014.77
5.3.260.0070.06014.56
5.3.250.0100.06714.75
5.3.240.0030.04314.61
5.3.230.0170.06014.61
5.3.220.0070.07014.65
5.3.210.0070.08014.73
5.3.200.0030.07714.56
5.3.190.0170.06714.72
5.3.180.0100.05714.61
5.3.170.0030.07714.57
5.3.160.0200.06014.57
5.3.150.0100.07014.51
5.3.140.0030.08014.59
5.3.130.0230.05714.55
5.3.120.0070.06314.62
5.3.110.0100.07714.63
5.3.100.0000.07713.98
5.3.90.0100.03714.14
5.3.80.0100.06714.18
5.3.70.0030.08014.17
5.3.60.0030.06013.91
5.3.50.0130.06314.02
5.3.40.0130.07013.86
5.3.30.0130.04713.85
5.3.20.0170.04013.71
5.3.10.0070.07013.79
5.3.00.0070.07313.64
5.2.170.0070.05711.05
5.2.160.0030.05311.08
5.2.150.0130.04711.02
5.2.140.0070.06011.16
5.2.130.0030.04011.11
5.2.120.0000.06311.18
5.2.110.0030.04711.02
5.2.100.0100.05311.24
5.2.90.0000.05710.98
5.2.80.0030.06011.22
5.2.70.0030.06311.04
5.2.60.0030.05710.98
5.2.50.0000.06010.96
5.2.40.0070.06311.03
5.2.30.0030.06311.04
5.2.20.0030.05011.11
5.2.10.0070.04710.95
5.2.00.0070.05710.78
5.1.60.0100.03010.09
5.1.50.0070.05010.02
5.1.40.0030.0409.99
5.1.30.0000.06010.27
5.1.20.0000.06310.51
5.1.10.0070.05310.16
5.1.00.0070.05310.09
5.0.50.0030.0478.56
5.0.40.0030.0478.50
5.0.30.0030.0578.13
5.0.20.0000.0308.31
5.0.10.0000.0438.05
5.0.00.0070.0338.20
4.4.90.0000.0377.63
4.4.80.0030.0377.63
4.4.70.0030.0207.63
4.4.60.0030.0337.63
4.4.50.0000.0237.63
4.4.40.0000.0437.63
4.4.30.0000.0407.63
4.4.20.0130.0277.63
4.4.10.0100.0277.63
4.4.00.0030.0477.63
4.3.110.0000.0307.63
4.3.100.0030.0177.63
4.3.90.0000.0337.63
4.3.80.0030.0537.63
4.3.70.0030.0337.63
4.3.60.0030.0377.63
4.3.50.0000.0337.63
4.3.40.0070.0477.63
4.3.30.0000.0407.63
4.3.20.0000.0337.63
4.3.10.0000.0277.63
4.3.00.0000.0377.63

preferences:
33.09 ms | 401 KiB | 5 Q