3v4l.org

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

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.4.290.0180.07212.48
5.4.280.0100.05512.38
5.4.270.0090.05612.38
5.4.260.0120.06412.38
5.4.250.0070.04912.39
5.4.240.0160.05712.38
5.4.230.0110.05212.38
5.4.220.0120.05312.37
5.4.210.0100.04912.38
5.4.200.0080.04212.38
5.4.190.0070.04012.37
5.4.180.0060.04012.37
5.4.170.0060.04112.38
5.4.160.0060.04212.38
5.4.150.0080.03912.38
5.4.140.0110.05012.06
5.4.130.0120.04312.05
5.4.120.0110.04712.01
5.4.110.0140.04412.00
5.4.100.0120.04412.00
5.4.90.0090.06812.00
5.4.80.0080.06312.00
5.4.70.0110.05012.00
5.4.60.0100.05612.00
5.4.50.0170.04211.99
5.4.40.0100.05211.98
5.4.30.0120.04811.98
5.4.20.0100.05411.98
5.4.10.0120.04711.98
5.4.00.0060.05511.47
5.3.280.0090.05712.71
5.3.270.0110.05612.73
5.3.260.0120.05512.72
5.3.250.0090.05412.72
5.3.240.0150.05612.71
5.3.230.0090.06112.71
5.3.220.0110.05412.68
5.3.210.0150.06912.68
5.3.200.0090.05112.68
5.3.190.0080.04212.67
5.3.180.0080.03912.67
5.3.170.0070.04012.67
5.3.160.0090.03612.67
5.3.150.0110.03512.67
5.3.140.0060.04512.66
5.3.130.0070.04412.66
5.3.120.0100.05212.66
5.3.110.0110.05012.66
5.3.100.0100.04712.12
5.3.90.0080.05712.11
5.3.80.0130.04212.10
5.3.70.0130.04412.10
5.3.60.0160.03812.09
5.3.50.0090.04812.03
5.3.40.0080.04912.03
5.3.30.0120.05111.99
5.3.20.0080.04811.77
5.3.10.0060.03911.74
5.3.00.0080.04611.72
5.2.170.0100.0299.23
5.2.160.0070.0399.23
5.2.150.0050.0349.22
5.2.140.0070.0319.22
5.2.130.0060.0319.18
5.2.120.0100.0279.18
5.2.110.0090.0299.20
5.2.100.0050.0369.19
5.2.90.0120.0289.19
5.2.80.0080.0339.18
5.2.70.0050.0439.18
5.2.60.0040.0469.13
5.2.50.0080.0359.10
5.2.40.0090.0379.07
5.2.30.0070.0419.06
5.2.20.0080.0399.05
5.2.10.0090.0418.95
5.2.00.0090.0388.82
5.1.60.0090.0258.09
5.1.50.0070.0338.09
5.1.40.0060.0368.07
5.1.30.0110.0338.42
5.1.20.0090.0358.45
5.1.10.0090.0358.17
5.1.00.0070.0348.17
5.0.50.0050.0276.65
5.0.40.0080.0246.51
5.0.30.0060.0426.32
5.0.20.0100.0246.29
5.0.10.0050.0326.26
5.0.00.0050.0366.25
4.4.90.0050.0144.78
4.4.80.0050.0154.76
4.4.70.0030.0174.75
4.4.60.0040.0164.76
4.4.50.0050.0144.77
4.4.40.0030.0274.71
4.4.30.0020.0164.76
4.4.20.0050.0134.85
4.4.10.0010.0184.85
4.4.00.0040.0294.76
4.3.110.0050.0204.67
4.3.100.0020.0184.66
4.3.90.0020.0164.64
4.3.80.0010.0274.59
4.3.70.0030.0154.63
4.3.60.0040.0144.63
4.3.50.0030.0164.63
4.3.40.0030.0254.54
4.3.30.0020.0173.30
4.3.20.0000.0183.28
4.3.10.0010.0173.23
4.3.00.0300.01710.31

preferences:
146.62 ms | 1394 KiB | 7 Q