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') ));

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.0000.07721.05
5.6.210.0000.04720.54
5.6.200.0030.08018.22
5.6.190.0100.06720.57
5.6.180.0200.04320.56
5.6.170.0270.07720.45
5.6.160.0030.05020.55
5.6.150.0070.03718.23
5.6.140.0030.03718.15
5.6.130.0100.04718.21
5.6.120.0000.05320.98
5.6.110.0000.07321.01
5.6.100.0070.07320.99
5.6.90.0130.07720.88
5.6.80.0100.07720.36
5.6.70.0400.05020.41
5.5.350.0030.08020.31
5.5.340.0100.08017.95
5.5.330.0130.05720.35
5.5.320.0070.06020.38
5.5.310.0170.04720.28
5.5.300.0070.04017.95
5.5.290.0100.07317.97
5.5.280.0100.08020.81
5.5.270.0070.04720.79
5.5.260.0130.08020.98
5.5.250.0130.03320.79
5.5.240.0070.08320.28
5.4.450.0630.06719.59
5.4.440.0900.06719.61
5.4.430.0600.05019.59
5.4.420.0870.05319.68
5.4.410.0870.05719.32
5.4.400.1030.05319.09
5.4.390.1000.06719.15
5.4.380.0230.05718.63
5.4.370.0070.05718.84
5.4.360.0170.03318.61
5.4.350.0080.03412.02
5.4.340.0070.05012.02
5.4.320.0080.03412.51
5.4.310.0030.04012.50
5.4.300.0050.04212.50
5.4.290.0080.03512.50
5.4.280.0070.04312.37
5.4.270.0080.03712.37
5.4.260.0090.03612.37
5.4.250.0090.03712.37
5.4.240.0040.04012.37
5.4.230.0110.03512.36
5.4.220.0070.03812.37
5.4.210.0130.03412.36
5.4.200.0080.05112.36
5.4.190.0110.04612.36
5.4.180.0100.04712.36
5.4.170.0080.04512.37
5.4.160.0110.04412.37
5.4.150.0110.05712.37
5.4.140.0120.05112.04
5.4.130.0060.05512.03
5.4.120.0220.06211.99
5.4.110.0080.03911.99
5.4.100.0090.03411.99
5.4.90.0070.03811.99
5.4.80.0100.03611.99
5.4.70.0060.03711.98
5.4.60.0130.04611.98
5.4.50.0140.05311.99
5.4.40.0180.04511.97
5.4.30.0210.06311.97
5.4.20.0150.05611.97
5.4.10.0080.06311.97
5.4.00.0110.05611.46
5.3.290.0070.04112.80
5.3.280.0090.07412.70
5.3.270.0150.06012.73
5.3.260.0170.06512.72
5.3.250.0110.03612.72
5.3.240.0070.04112.72
5.3.230.0070.04212.71
5.3.220.0090.04212.68
5.3.210.0090.05312.68
5.3.200.0120.06912.68
5.3.190.0070.06012.68
5.3.180.0160.06612.68
5.3.170.0120.06212.66
5.3.160.0110.05612.67
5.3.150.0100.06312.67
5.3.140.0130.04812.66
5.3.130.0230.08812.65
5.3.120.0100.05112.66
5.3.110.0090.05812.65
5.3.100.0130.05612.12
5.3.90.0070.08812.09
5.3.80.0100.05812.07
5.3.70.0100.05212.08
5.3.60.0090.04312.07
5.3.50.0100.05012.00
5.3.40.0100.03412.00
5.3.30.0080.03411.96
5.3.20.0060.03711.75
5.3.10.0090.03411.70
5.3.00.0040.04011.69
5.2.170.0060.0339.19
5.2.160.0090.0349.19
5.2.150.0030.0359.19
5.2.140.0050.0379.19
5.2.130.0050.0379.15
5.2.120.0090.0369.15
5.2.110.0060.0429.16
5.2.100.0080.0399.16
5.2.90.0060.0429.16
5.2.80.0030.0449.15
5.2.70.0060.0309.15
5.2.60.0090.0309.10
5.2.50.0050.0309.07
5.2.40.0060.0479.04
5.2.30.0100.0409.03
5.2.20.0080.0419.00
5.2.10.0050.0388.92
5.2.00.0110.0348.79
5.1.60.0020.0338.07
5.1.50.0070.0278.07
5.1.40.0060.0358.05
5.1.30.0030.0368.39
5.1.20.0070.0298.42
5.1.10.0050.0308.14
5.1.00.0070.0278.14
5.0.50.0080.0236.62
5.0.40.0090.0276.48
5.0.30.0070.0396.30
5.0.20.0060.0336.25
5.0.10.0060.0306.24
5.0.00.0040.0526.22
4.4.90.0030.0204.78
4.4.80.0020.0174.75
4.4.70.0020.0174.75
4.4.60.0060.0144.75
4.4.50.0040.0154.77
4.4.40.0040.0264.70
4.4.30.0030.0164.76
4.4.20.0040.0154.85
4.4.10.0040.0244.84
4.4.00.0070.0294.76
4.3.110.0060.0154.67
4.3.100.0020.0164.67
4.3.90.0030.0164.64
4.3.80.0030.0264.58
4.3.70.0050.0144.63
4.3.60.0040.0144.63
4.3.50.0030.0164.63
4.3.40.0030.0264.54
4.3.30.0020.0183.28
4.3.20.0010.0183.27
4.3.10.0010.0183.23
4.3.00.0100.0237.27

preferences:
142.69 ms | 1394 KiB | 7 Q