3v4l.org

run code in 300+ PHP versions simultaneously
<?php class dyncall { public function __call( $name, $args ) { return $args[0]; } } class declaredcall { public function call( $value ) { return $value; } } $results = array(); $instance = new dyncall(); $start = microtime(true); for ($i = 0; $i < 100000; $i++) { $results[] = $instance->call('foo'); } $end = microtime(true); var_dump($end - $start); $results = array(); $instance = new declaredcall(); $start = microtime(true); for ($i = 0; $i < 100000; $i++) { $results[] = $instance->call('foo'); } $end = microtime(true); var_dump($end - $start);

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.10.0130.02919.85
7.4.00.0130.04019.46
7.3.130.0230.02019.59
7.3.120.0160.02319.64
7.3.110.0140.03419.38
7.3.100.0160.02319.83
7.3.90.0160.03619.90
7.3.80.0110.02119.47
7.3.70.0070.02719.64
7.3.60.0100.02319.80
7.3.50.0130.02019.53
7.3.40.0140.02719.64
7.3.30.0200.02019.70
7.3.20.0100.02622.41
7.3.10.0100.02222.48
7.3.00.0100.02122.32
7.2.260.0130.04519.63
7.2.250.0140.04119.86
7.2.240.0090.02819.75
7.2.230.0130.02620.00
7.2.220.0160.03919.80
7.2.210.0070.03319.96
7.2.200.0160.02219.90
7.2.190.0140.02119.97
7.2.180.0130.02719.96
7.2.170.0130.02619.80
7.2.160.0040.03619.90
7.2.150.0070.02822.87
7.2.140.0100.02522.57
7.2.130.0070.02823.05
7.2.120.0000.03322.93
7.2.110.0070.02022.90
7.2.100.0100.02422.93
7.2.90.0070.02622.95
7.2.80.0070.02622.89
7.2.70.0070.02722.57
7.2.60.0030.02622.91
7.2.50.0060.02922.75
7.2.40.0040.02522.96
7.2.30.0100.02222.91
7.2.20.0030.02822.93
7.2.10.0070.02222.93
7.2.00.0030.02722.74
7.1.330.0030.04721.84
7.1.320.0090.03521.88
7.1.310.0070.04521.76
7.1.300.0070.04221.83
7.1.290.0030.04521.73
7.1.280.0100.05521.64
7.1.270.0030.06121.85
7.1.260.0000.04921.60
7.1.250.0130.04921.93
7.1.240.0100.03521.70
7.1.230.0070.04321.80
7.1.220.0100.03621.46
7.1.210.0070.04121.68
7.1.200.0070.04121.79
7.1.190.0070.03521.72
7.1.180.0070.04121.92
7.1.170.0030.04121.59
7.1.160.0100.03721.61
7.1.150.0060.04621.46
7.1.140.0130.03521.84
7.1.130.0100.03621.87
7.1.120.0140.03721.87
7.1.110.0070.04121.65
7.1.100.0030.04121.90
7.1.90.0100.03921.47
7.1.80.0100.03721.70
7.1.70.0080.03422.36
7.1.60.0070.04722.67
7.1.50.0110.04122.58
7.1.40.0070.04121.79
7.1.30.0160.03321.88
7.1.20.0060.04221.73
7.1.10.0030.04421.76
7.1.00.0070.05425.03
7.0.330.0030.05921.65
7.0.320.0070.04021.38
7.0.310.0030.04421.46
7.0.300.0030.04221.43
7.0.290.0030.04421.45
7.0.280.0100.03621.63
7.0.270.0040.04321.44
7.0.260.0030.04321.41
7.0.250.0060.04221.54
7.0.240.0100.03921.48
7.0.230.0070.04121.57
7.0.220.0030.04621.63
7.0.210.0070.03921.48
7.0.200.0100.02622.07
7.0.190.0100.03621.40
7.0.180.0090.03721.20
7.0.170.0000.05021.45
7.0.160.0070.03821.53
7.0.150.0030.04321.16
7.0.140.0070.06924.78
7.0.130.0100.04721.62
7.0.120.0070.03621.53
7.0.110.0130.04021.60
7.0.100.0220.07423.14
7.0.90.0130.07623.15
7.0.80.0230.06623.02
7.0.70.0250.06223.12
7.0.60.0180.06823.21
7.0.50.0080.06623.43
7.0.40.0170.04821.74
7.0.30.0350.04921.80
7.0.20.0170.06421.75
7.0.10.0030.06221.74
7.0.00.0050.04821.73
5.6.400.0170.13328.70
5.6.390.0260.12428.91
5.6.380.0200.13228.89
5.6.370.0130.12328.84
5.6.360.0270.12328.74
5.6.350.0100.12828.33
5.6.340.0330.11728.56
5.6.330.0170.11628.41
5.6.320.0230.12328.30
5.6.310.0140.12528.63
5.6.300.0230.12628.51
5.6.290.0290.10828.52
5.6.280.0150.14431.83
5.6.270.0200.12028.68
5.6.260.0300.10328.32
5.6.250.0150.14831.51
5.6.240.0130.15231.65
5.6.230.0200.14331.58
5.6.220.0100.13831.52
5.6.210.0150.14031.37
5.6.200.0200.11931.87
5.6.190.0120.11731.97
5.6.180.0180.12531.80
5.6.170.0170.11331.94
5.6.160.0080.11931.79
5.6.150.0170.11731.74
5.6.140.0180.10431.74
5.6.130.0250.11831.73
5.6.120.0100.12531.76
5.6.110.0170.11531.88
5.6.100.0130.14731.71
5.6.90.0210.15231.87
5.6.80.0150.13831.57
5.6.70.0200.14831.47
5.6.60.0170.11931.28
5.6.50.0120.15531.32
5.6.40.0200.14731.28
5.6.30.0100.15631.49
5.6.20.0220.13531.46
5.6.10.0180.12731.35
5.6.00.0180.14731.38
5.5.380.0130.13231.41
5.5.370.0200.14631.33
5.5.360.0130.14431.49
5.5.350.0070.15431.48
5.5.340.0240.12331.70
5.5.330.0210.11531.59
5.5.320.0120.11931.71
5.5.310.0150.11731.71
5.5.300.0150.11531.69
5.5.290.0130.11931.65
5.5.280.0150.10631.68
5.5.270.0100.13131.47
5.5.260.0080.12131.66
5.5.250.0150.14731.69
5.5.240.0150.16331.29
5.5.230.0130.13631.42
5.5.220.0130.14131.29
5.5.210.0170.13331.34
5.5.200.0220.14631.32
5.5.190.0120.14131.43
5.5.180.0170.12831.32
5.5.170.0030.13028.04
5.5.160.0100.17031.27
5.5.150.0120.15031.21
5.5.140.0120.11531.29
5.5.130.0130.13731.22
5.5.120.0120.12131.20
5.5.110.0130.14831.38
5.5.100.0180.13931.15
5.5.90.0170.13731.13
5.5.80.0130.14831.30
5.5.70.0150.14431.29
5.5.60.0170.12731.16
5.5.50.0180.13931.07
5.5.40.0070.14631.22
5.5.30.0200.12931.11
5.5.20.0170.13631.28
5.5.10.0120.12831.12
5.5.00.0180.15031.41
5.4.450.0130.11529.30
5.4.440.0150.11329.13
5.4.430.0200.12929.04
5.4.420.0170.14129.27
5.4.410.0200.15029.07
5.4.400.0230.12729.04
5.4.390.0200.11729.07
5.4.380.0180.11229.17
5.4.370.0150.13129.19
5.4.360.0130.14028.84
5.4.350.0170.15428.89
5.4.340.0220.13429.03
5.4.330.0170.17425.08
5.4.320.0080.13828.97
5.4.310.0130.13328.82
5.4.300.0130.14629.13
5.4.290.0230.14228.84
5.4.280.0250.14329.04
5.4.270.0100.15029.10
5.4.260.0150.14729.04
5.4.250.0120.16429.06
5.4.240.0180.14729.20
5.4.230.0100.14029.15
5.4.220.0140.15428.98
5.4.210.0200.12728.99
5.4.200.0200.12928.88
5.4.190.0230.13328.97
5.4.180.0200.13728.97
5.4.170.0080.14729.06
5.4.160.0130.12928.94
5.4.150.0170.13729.10
5.4.140.0180.18327.90
5.4.130.0200.15727.82
5.4.120.0120.16127.62
5.4.110.0120.14027.67
5.4.100.0120.14327.75
5.4.90.0220.14427.73
5.4.80.0100.15227.61
5.4.70.0180.14127.71
5.4.60.0130.11027.60
5.4.50.0120.12027.65
5.4.40.0130.12127.74
5.4.30.0300.14627.81
5.4.20.0180.11627.71
5.4.10.0080.14027.66
5.4.00.0200.10927.44
5.3.290.0130.17229.69
5.3.280.0080.17529.61
5.3.270.0150.16129.63
5.3.260.0130.16629.56
5.3.250.0100.17629.63
5.3.240.0070.16529.54
5.3.230.0120.18029.55
5.3.220.0100.18229.43
5.3.210.0120.16029.56
5.3.200.0100.17029.58
5.3.190.0080.16129.53
5.3.180.0080.19329.65
5.3.170.0080.16429.68
5.3.160.0130.17729.62
5.3.150.0150.16129.47
5.3.140.0220.18529.55
5.3.130.0100.15729.46
5.3.120.0120.16329.47
5.3.110.0200.15529.64
5.3.100.0150.17929.32
5.3.90.0150.15829.32
5.3.80.0120.16429.02
5.3.70.0070.17929.21
5.3.60.0130.19029.15
5.3.50.0220.15629.21
5.3.40.0150.17329.18
5.3.30.0120.16729.30
5.3.20.0070.18029.54
5.3.10.0200.15328.97
5.3.00.0180.15028.98
5.2.170.0100.19027.05
5.2.160.0070.18727.10
5.2.150.0100.16027.26
5.2.140.0100.20727.16
5.2.130.0100.16727.08
5.2.120.0270.18727.05
5.2.110.0130.18327.23
5.2.100.0130.18727.11
5.2.90.0070.16727.08
5.2.80.0030.15727.21
5.2.70.0070.18027.21
5.2.60.0130.16727.12
5.2.50.0070.22027.10
5.2.40.0300.20027.13
5.2.30.0170.17727.09
5.2.20.0130.13327.11
5.2.10.0100.14326.93
5.2.00.0100.18326.63
5.1.60.0100.19732.42
5.1.50.0300.16332.44
5.1.40.0200.16332.48
5.1.30.0130.17732.69
5.1.20.0330.18032.81
5.1.10.0100.21032.49
5.1.00.0100.20732.57
5.0.50.0130.20730.99
5.0.40.0130.23030.83
5.0.30.0070.23730.53
5.0.20.0370.21730.62
5.0.10.0100.22730.63
5.0.00.0100.20030.47
4.4.90.0030.02313.26
4.4.80.0100.02713.26
4.4.70.0070.02313.26
4.4.60.0070.02713.26
4.4.50.0030.02713.26
4.4.40.0070.04713.26
4.4.30.0030.03313.26
4.4.20.0030.03013.26
4.4.10.0030.03713.26
4.4.00.0070.04713.26
4.3.110.0000.03713.26
4.3.100.0070.03013.26
4.3.90.0030.03313.26
4.3.80.0000.04013.26
4.3.70.0030.03313.26
4.3.60.0030.03313.26
4.3.50.0000.01713.26
4.3.40.0130.04313.26
4.3.30.0100.02713.26
4.3.20.0030.03313.26
4.3.10.0030.03313.26
4.3.00.0000.03713.26

preferences:
35.75 ms | 401 KiB | 5 Q