3v4l.org

run code in 300+ PHP versions simultaneously
<?php class String{ private $string; public function __construct($string){ $this->string = $string; } public function __toString(){ return strval($this->string); } } var_dump(array( new String('a') => new String('b') )); $b[new String('c')] = new String('d'); var_dump($b);

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.0130.06320.79
5.6.210.0000.09020.73
5.6.200.0130.07018.20
5.6.190.0170.07720.55
5.6.180.0370.04320.55
5.6.170.0300.07720.45
5.6.160.0030.06320.48
5.6.150.0070.07718.16
5.6.140.0030.04718.18
5.6.130.0100.03318.23
5.6.120.0030.08721.00
5.6.110.0070.06021.03
5.6.100.0130.07721.14
5.6.90.0000.09020.97
5.6.80.0070.04320.39
5.5.350.0100.03720.39
5.5.340.0100.03718.01
5.5.330.0070.04320.35
5.5.320.0330.06720.34
5.5.310.0230.03320.35
5.5.300.0000.04317.92
5.5.290.0100.06717.99
5.5.280.0070.05320.79
5.5.270.0000.04320.75
5.5.260.0030.05020.79
5.5.250.0100.07020.55
5.5.240.0030.07720.13
5.4.450.0000.07319.31
5.4.440.0100.06719.31
5.4.430.0230.06719.41
5.4.420.0130.07019.56
5.4.410.0000.05719.24
5.4.400.0070.05719.22
5.4.390.0230.06018.85
5.4.380.0130.07019.20
5.4.370.0100.07319.13
5.4.360.0170.07718.96
5.4.350.0200.03719.09
5.4.340.0200.03719.06
5.4.320.0130.04019.22
5.4.310.0200.03718.98
5.4.300.0130.04019.31
5.4.290.0130.04019.32
5.4.280.0170.04319.06
5.4.270.0130.04019.15
5.4.260.0200.03718.86
5.4.250.0100.04319.08
5.4.240.0130.04019.21
5.4.230.0170.03718.98
5.4.220.0200.04019.07
5.4.210.0200.03319.24
5.4.200.0230.03319.05
5.4.190.0130.04019.21
5.4.180.0200.03319.21
5.4.170.0170.03719.23
5.4.160.0130.04318.93
5.4.150.0170.04319.22
5.4.140.0170.03716.51
5.4.130.0130.05016.37
5.4.120.0170.07716.36
5.4.110.0230.04316.56
5.4.100.0170.06316.54
5.4.90.0300.06016.55
5.4.80.0270.07016.54
5.4.70.0270.05716.35
5.4.60.0270.06316.21
5.4.50.0370.06716.24
5.4.40.0330.07316.53
5.4.30.0300.06316.16
5.4.20.0370.06316.42
5.4.10.0370.05316.54
5.4.00.0230.05015.98
5.3.290.0130.04014.57
5.3.280.0270.02714.68
5.3.270.0170.04014.51
5.3.260.0300.03014.62
5.3.250.0270.03314.52
5.3.240.0170.03714.52
5.3.230.0130.04714.68
5.3.220.0270.07314.58
5.3.210.0170.04014.49
5.3.200.0330.06714.49
5.3.190.0230.07714.59
5.3.180.0230.07314.64
5.3.170.0200.06714.69
5.3.160.0170.04714.48
5.3.150.0300.06314.49
5.3.140.0330.05014.47
5.3.130.0130.07714.67
5.3.120.0170.07314.55
5.3.110.0230.06714.55
5.3.100.0170.03313.95
5.3.90.0170.06313.93
5.3.80.0100.06314.00
5.3.70.0230.06013.93
5.3.60.0330.05714.08
5.3.50.0270.07313.88
5.3.40.0200.07013.88
5.3.30.0230.07013.89
5.3.20.0170.05013.75
5.3.10.0200.07713.88
5.3.00.0400.06013.67
5.2.170.0230.05711.99
5.2.160.0170.06011.99
5.2.150.0230.05711.99
5.2.140.0130.04011.99
5.2.130.0170.05711.99
5.2.120.0130.06011.99
5.2.110.0130.05711.99
5.2.100.0270.05011.99
5.2.90.0200.06311.99
5.2.80.0170.05711.99
5.2.70.0230.04711.99
5.2.60.0170.06311.99
5.2.50.0370.04011.99
5.2.40.0130.05011.99
5.2.30.0270.04711.99
5.2.20.0230.04011.99
5.2.10.0170.06011.99
5.2.00.0170.05011.99
5.1.60.0170.04311.99
5.1.50.0170.02311.99
5.1.40.0230.04011.99
5.1.30.0200.06011.99
5.1.20.0200.04011.99
5.1.10.0100.05011.99
5.1.00.0170.03711.99
5.0.50.0100.03011.99
5.0.40.0030.03711.99
5.0.30.0030.06711.99
5.0.20.0030.04711.99
5.0.10.0070.03711.99
5.0.00.0100.04311.99
4.4.90.0070.03011.99
4.4.80.0100.03011.99
4.4.70.0070.03711.99
4.4.60.0070.03711.99
4.4.50.0070.03311.99
4.4.40.0100.02711.99
4.4.30.0130.03011.99
4.4.20.0070.03711.99
4.4.10.0070.03311.99
4.4.00.0070.04311.99
4.3.110.0100.02311.99
4.3.100.0000.03711.99
4.3.90.0100.02011.99
4.3.80.0100.03311.99
4.3.70.0130.03011.99
4.3.60.0130.03011.99
4.3.50.0170.03311.99
4.3.40.0200.04711.99
4.3.30.0070.03711.99
4.3.20.0030.04011.99
4.3.10.0000.03011.99
4.3.00.0070.02711.99

preferences:
143.74 ms | 1394 KiB | 7 Q