3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class string { private $holder = null; public function __construct($string) { $this->holder = (string)$string; } public function __toString() { return $this->holder; } public function __call($name, $args) { return call_user_func_array($name, array_merge([$this->holder], $args)); } } var_dump( strlen(new string('foo')), (new string('bar'))->strlen() );

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)
5.6.280.0070.07020.90
5.6.210.0130.05320.48
5.6.200.0070.07318.20
5.6.190.0030.08320.51
5.6.180.0100.04720.58
5.6.170.0270.06320.71
5.6.160.0070.04020.53
5.6.150.0100.06318.16
5.6.140.0130.07318.12
5.6.130.0100.07718.14
5.6.120.0030.04321.08
5.6.110.0000.04321.05
5.6.100.0000.06320.98
5.6.90.0030.04020.89
5.6.80.0070.06720.38
5.6.70.3670.03720.29
5.5.350.4070.03720.41
5.5.340.0100.06317.93
5.5.330.0030.04720.43
5.5.320.0030.05320.20
5.5.310.0270.08020.37
5.5.300.0070.08018.09
5.5.290.0030.06318.02
5.5.280.0070.04320.73
5.5.270.0130.08020.80
5.5.260.0000.05320.87
5.5.250.0100.06720.50
5.5.240.0200.06020.13
5.4.450.0800.04719.61
5.4.440.0300.06319.45
5.4.430.0770.07319.34
5.4.420.0070.05719.29
5.4.410.0830.05719.49
5.4.400.0300.05318.76
5.4.390.0170.05318.50
5.4.380.0230.05318.81
5.4.370.0070.04318.86
5.4.360.0330.03718.79
5.4.350.0050.03912.02
5.4.340.0050.03712.02
5.4.320.0080.03412.50
5.4.310.0060.03712.50
5.4.300.0120.05212.50
5.4.290.0080.05912.50
5.4.280.0120.05112.40
5.4.270.0110.05112.40
5.4.260.0110.05312.40
5.4.250.0090.05912.40
5.4.240.0130.05112.39
5.4.230.0270.08712.39
5.4.220.0180.08412.39
5.4.210.0130.08312.39
5.4.200.0080.05712.39
5.4.190.0070.05512.39
5.4.180.0080.05312.39
5.4.170.0130.07512.39
5.4.160.0100.05212.40
5.4.150.0090.05212.39
5.4.140.0080.06012.07
5.4.130.0110.04812.07
5.4.120.0070.05312.02
5.4.110.0160.09212.02
5.4.100.0140.07812.02
5.4.90.0120.06412.01
5.4.80.0140.04612.02
5.4.70.0090.06012.01
5.4.60.0210.05912.02
5.4.50.0250.10712.01
5.4.40.0310.09812.00
5.4.30.0150.08812.00
5.4.20.0150.10112.00
5.4.10.0120.05812.00
5.4.00.0130.04911.48
5.3.280.0110.05812.71
5.3.270.0220.08212.73
5.3.260.0170.08112.72
5.3.250.0090.05812.72
5.3.240.0070.05912.71
5.3.230.0100.05512.71
5.3.220.0130.06112.68
5.3.210.0110.06312.68
5.3.200.0080.06212.68
5.3.190.0090.05912.68
5.3.180.0060.06412.68
5.3.170.0090.05612.67
5.3.160.0100.05512.67
5.3.150.0110.05712.67
5.3.140.0110.06612.66
5.3.130.0090.07312.65
5.3.120.0140.04912.66
5.3.110.0260.12212.66
5.3.100.0180.17012.13
5.3.90.0050.05812.11
5.3.80.0040.05712.09
5.3.70.0220.10512.09
5.3.60.0120.10612.08
5.3.50.0090.07012.03
5.3.40.0140.05012.03
5.3.30.0080.05711.99
5.3.20.0150.07611.77
5.3.10.0200.10511.73
5.3.00.0160.08011.72
5.2.170.0180.0799.22
5.2.160.0080.0449.23
5.2.150.0060.0479.22
5.2.140.0100.0459.22
5.2.130.0080.0459.18
5.2.120.0080.0419.18
5.2.110.0070.0469.20
5.2.100.0110.0409.18
5.2.90.0100.0399.19
5.2.80.0090.0419.18
5.2.70.0120.0519.18
5.2.60.0110.0649.13
5.2.50.0170.0599.10
5.2.40.0070.0419.07
5.2.30.0070.0429.05
5.2.20.0060.0439.04
5.2.10.0080.0408.95
5.2.00.0120.0398.81
5.1.60.0080.0358.09
5.1.50.0230.0488.09
5.1.40.0090.0468.07
5.1.30.0080.0428.43
5.1.20.0050.0408.44
5.1.10.0060.0528.16
5.1.00.0050.0428.17
5.0.50.0080.0286.65
5.0.40.0110.0286.51
5.0.30.0160.0856.32
5.0.20.0080.0436.29
5.0.10.0120.0336.26
5.0.00.0060.0436.25
4.4.90.0050.0244.77
4.4.80.0100.0214.75
4.4.70.0060.0244.76
4.4.60.0000.0354.76
4.4.50.0080.0264.77
4.4.40.0040.0354.71
4.4.30.0050.0274.76
4.4.20.0050.0274.84
4.4.10.0060.0254.85
4.4.00.0090.0344.76
4.3.110.0030.0294.67
4.3.100.0050.0264.66
4.3.90.0050.0264.64
4.3.80.0040.0394.58
4.3.70.0090.0214.63
4.3.60.0050.0254.63
4.3.50.0050.0254.63
4.3.40.0090.0344.54
4.3.30.0040.0233.29
4.3.20.0060.0223.26
4.3.10.0060.0233.22
4.3.00.0070.0237.15

preferences:
141.42 ms | 1394 KiB | 7 Q