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"; echo $this->position >= strlen($GLOBALS[$this->varname]); 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.3.120.0080.00814.92
7.3.110.0060.01014.87
7.3.100.0050.01014.99
7.3.90.0050.00914.94
7.3.80.0070.01015.06
7.3.70.0060.01014.85
7.3.60.0060.00814.96
7.3.50.0070.00714.87
7.3.40.0020.01314.80
7.3.30.0050.00914.84
7.3.20.0090.00716.78
7.3.10.0030.01116.84
7.3.00.0060.00816.61
7.2.240.0040.01015.04
7.2.230.0030.01215.26
7.2.220.0050.01015.15
7.2.210.0080.00614.93
7.2.200.0070.01015.12
7.2.190.0090.00715.17
7.2.180.0080.00815.15
7.2.170.0090.00715.22
7.2.160.0080.00615.07
7.2.150.0050.01116.88
7.2.140.0030.01216.98
7.2.130.0040.01016.89
7.2.120.0080.00916.92
7.2.110.0050.00916.90
7.2.100.0050.00816.97
7.2.90.0060.00616.90
7.2.80.0050.00917.02
7.2.70.0050.00916.87
7.2.60.0050.00616.98
7.2.50.0050.00916.94
7.2.40.0050.00916.94
7.2.30.0080.00616.99
7.2.20.0090.00517.05
7.2.10.0070.00717.03
7.2.00.0060.00717.47
7.1.330.0040.00916.00
7.1.320.0060.00715.79
7.1.310.0050.00915.94
7.1.300.0090.00515.85
7.1.290.0040.00915.72
7.1.280.0080.00615.75
7.1.270.0060.00415.62
7.1.260.0050.00715.75
7.1.250.0060.00815.84
7.1.240.0040.01215.69
7.1.230.0060.00915.86
7.1.220.0000.01015.51
7.1.210.0100.00315.83
7.1.200.0070.00315.76
7.1.190.0060.00615.97
7.1.180.0000.01515.49
7.1.170.0030.01015.83
7.1.160.0000.01215.48
7.1.150.0030.00615.61
7.1.140.0000.01615.80
7.1.130.0110.00615.78
7.1.120.0050.00515.96
7.1.110.0060.00315.92
7.1.100.0010.00716.85
7.1.90.0000.01215.88
7.1.80.0090.00315.81
7.1.70.0030.00516.60
7.1.60.0080.01017.63
7.1.50.0060.00916.33
7.1.40.0000.01415.81
7.1.30.0040.00415.92
7.1.20.0000.01315.69
7.1.10.0060.00915.77
7.1.00.0030.04219.08
7.0.330.0070.00315.43
7.0.320.0070.00715.48
7.0.310.0040.00715.54
7.0.300.0100.00315.59
7.0.290.0090.00315.43
7.0.280.0070.00715.57
7.0.270.0060.00315.46
7.0.260.0050.00515.36
7.0.250.0060.00315.55
7.0.240.0100.00315.38
7.0.230.0100.00015.56
7.0.220.0090.00315.48
7.0.210.0030.01015.34
7.0.200.0070.00516.23
7.0.190.0070.00015.58
7.0.180.0030.00615.27
7.0.170.0040.00815.21
7.0.160.0060.00315.42
7.0.150.0040.00415.44
7.0.140.0070.03518.72
7.0.130.0090.00615.50
7.0.120.0070.00715.51
7.0.110.0040.01115.64
7.0.100.0090.00615.38
7.0.90.0070.00715.47
7.0.80.0070.04217.66
7.0.70.0100.04217.80
7.0.60.0080.03817.70
7.0.50.0100.03917.95
7.0.40.0100.03816.90
7.0.30.0050.04616.81
7.0.20.0110.03816.72
7.0.10.0100.03916.69
7.0.00.0070.04416.85
5.6.380.0030.01014.27
5.6.370.0100.00014.46
5.6.360.0080.00814.69
5.6.350.0100.00014.71
5.6.340.0000.01314.33
5.6.330.0090.00614.74
5.6.320.0090.00614.48
5.6.310.0040.00714.53
5.6.300.0070.00714.40
5.6.290.0030.00914.66
5.6.280.0090.03517.78
5.6.270.0060.00314.55
5.6.260.0000.01414.36
5.6.250.0030.00614.54
5.6.240.0080.00414.32
5.6.230.0110.04117.68
5.6.220.0050.04817.63
5.6.210.0030.03217.53
5.6.200.0080.03217.72
5.6.190.0110.02517.71
5.6.180.0040.04417.91
5.6.170.0150.04217.85
5.6.160.0100.04017.89
5.6.150.0050.04417.67
5.6.140.0050.02517.71
5.6.130.0070.03717.72
5.6.120.0040.04717.68
5.6.110.0050.04517.69
5.6.100.0080.03817.73
5.6.90.0050.04817.70
5.6.80.0050.04017.39
5.6.70.0100.02817.40
5.6.60.0100.04117.30
5.6.50.0030.04317.39
5.6.40.0000.03317.24
5.6.30.0060.04117.45
5.6.20.0080.04017.39
5.6.10.0080.04117.24
5.6.00.0100.03317.32
5.5.380.0000.01111.21
5.5.370.0090.04015.86
5.5.360.0080.04315.93
5.5.350.0060.04515.76
5.5.340.0080.03816.21
5.5.330.0050.04316.02
5.5.320.0050.04316.09
5.5.310.0090.02516.01
5.5.300.0160.03515.97
5.5.290.0030.02815.96
5.5.280.0050.04516.04
5.5.270.0000.04915.97
5.5.260.0050.03815.98
5.5.250.0110.03815.93
5.5.240.0030.04515.71
5.5.230.0110.03315.66
5.5.220.0030.04615.77
5.5.210.0030.04515.83
5.5.200.0030.03015.71
5.5.190.0070.04015.70
5.5.180.0030.04715.72
5.5.170.0000.00911.18
5.5.160.0070.02315.73
5.5.150.0070.04515.73
5.5.140.0050.04315.65
5.5.130.0060.04515.74
5.5.120.0100.03715.80
5.5.110.0070.04315.63
5.5.100.0070.02715.65
5.5.90.0030.04515.65
5.5.80.0030.04115.67
5.5.70.0030.04515.65
5.5.60.0030.02915.62
5.5.50.0050.03315.67
5.5.40.0110.03015.64
5.5.30.0080.04115.57
5.5.20.0070.04015.56
5.5.10.0090.04215.68
5.5.00.0100.03715.58
5.4.450.0030.04715.30
5.4.440.0070.04415.35
5.4.430.0100.04015.31
5.4.420.0080.02715.35
5.4.410.0100.04015.26
5.4.400.0100.02715.33
5.4.390.0100.02515.15
5.4.380.0080.03815.12
5.4.370.0070.04015.15
5.4.360.0080.04115.09
5.4.350.0080.03715.04
5.4.340.0050.04015.17
5.4.330.0060.00311.39
5.4.320.0060.04115.27
5.4.310.0060.03615.07
5.4.300.0070.03615.06
5.4.290.0080.03715.11
5.4.280.0050.02815.24
5.4.270.0080.03315.18
5.4.260.0100.03715.07
5.4.250.0100.03615.10
5.4.240.0110.03115.25
5.4.230.0030.04115.07
5.4.220.0050.02515.21
5.4.210.0100.03815.19
5.4.200.0070.04015.17
5.4.190.0070.03015.11
5.4.180.0030.04515.09
5.4.170.0070.04015.20
5.4.160.0080.03615.09
5.4.150.0070.03215.09
5.4.140.0020.03013.89
5.4.130.0020.02313.85
5.4.120.0030.02313.92
5.4.110.0060.03813.85
5.4.100.0070.04113.83
5.4.90.0030.03613.88
5.4.80.0020.03513.75
5.4.70.0070.04013.92
5.4.60.0030.04013.80
5.4.50.0110.03613.81
5.4.40.0100.03513.90
5.4.30.0090.03513.94
5.4.20.0060.03613.84
5.4.10.0060.02613.75
5.4.00.0060.03713.60
5.3.290.0030.04112.91
5.3.280.0030.04212.91
5.3.270.0050.02512.90
5.3.260.0010.02812.89
5.3.250.0070.04212.93
5.3.240.0030.03612.89
5.3.230.0050.02612.96
5.3.220.0100.03312.90
5.3.210.0080.04012.92
5.3.200.0030.03812.91
5.3.190.0070.03612.94
5.3.180.0100.03412.85
5.3.170.0030.04512.84
5.3.160.0050.03612.86
5.3.150.0050.04012.89
5.3.140.0070.03512.87
5.3.130.0070.03512.93
5.3.120.0050.04312.84
5.3.110.0100.02312.89
5.3.100.0040.03612.65
5.3.90.0080.03712.64
5.3.80.0110.03312.56
5.3.70.0070.04212.62
5.3.60.0050.03012.64
5.3.50.0030.03412.52
5.3.40.0080.03112.54
5.3.30.0070.02712.56
5.3.20.0050.02012.50
5.3.10.0050.03712.46
5.3.00.0000.04012.45
5.2.170.0000.03311.24
5.2.160.0050.03211.24
5.2.150.0050.02211.24
5.2.140.0020.01711.11
5.2.130.0020.03311.20
5.2.120.0020.03511.18
5.2.110.0070.03311.16
5.2.100.0050.03011.11
5.2.90.0020.03511.11
5.2.80.0000.03811.21
5.2.70.0020.02911.15
5.2.60.0050.03111.13
5.2.50.0030.03411.16
5.2.40.0070.02611.08
5.2.30.0050.03011.12
5.2.20.0020.02311.11
5.2.10.0050.01711.08
5.2.00.0030.02011.08
5.1.60.0050.02511.08
5.1.50.0050.01911.08
5.1.40.0010.03011.08
5.1.30.0060.02711.08
5.1.20.0050.02111.08
5.1.10.0050.02011.08
5.1.00.0060.02311.08
5.0.50.0050.01211.08
5.0.40.0060.02011.08
5.0.30.0040.02311.08
5.0.20.0000.02411.08
5.0.10.0050.01811.08
5.0.00.0070.02511.08
4.4.90.0030.01711.08
4.4.80.0030.01711.08
4.4.70.0000.01711.08
4.4.60.0040.02011.08
4.4.50.0020.01811.08
4.4.40.0000.02811.08
4.4.30.0010.01811.08
4.4.20.0020.00911.08
4.4.10.0020.01211.08
4.4.00.0000.03211.08
4.3.110.0020.01811.08
4.3.100.0000.02111.08
4.3.90.0030.01311.08
4.3.80.0030.01811.08
4.3.70.0050.01511.08
4.3.60.0040.00811.08
4.3.50.0010.01811.08
4.3.40.0030.02911.08
4.3.30.0020.01511.08
4.3.20.0020.01311.08
4.3.10.0050.00811.08
4.3.00.0020.01011.08

preferences:
36.82 ms | 401 KiB | 5 Q