3v4l.org

run code in 300+ PHP versions simultaneously
<?php class String { public function __construct($s) { $this->payload = str_split($s); } public function __toString() { return implode($this->payload,''); } } $test = new String("hello"); var_dump($test->payload); echo $test;

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.07320.93
5.6.210.0100.06720.54
5.6.200.0070.06018.19
5.6.190.0200.06020.60
5.6.180.0270.07020.59
5.6.170.0200.05320.71
5.6.160.0100.08320.57
5.6.150.0070.03718.16
5.6.140.0000.06718.17
5.6.130.0000.05018.16
5.6.120.0170.08021.16
5.6.110.0070.07021.02
5.6.100.0000.04320.98
5.6.90.0100.06721.11
5.6.80.0030.08720.40
5.5.350.3470.04720.31
5.5.340.0070.07718.07
5.5.330.0100.08020.40
5.5.320.0370.07020.30
5.5.310.0300.04720.26
5.5.300.0070.09317.98
5.5.290.0000.04317.95
5.5.280.0170.07720.75
5.5.270.0030.09020.96
5.5.260.0100.08020.62
5.5.250.0130.05320.69
5.5.240.0100.04720.04
5.4.450.0400.04721.57
5.4.440.0470.04021.36
5.4.430.0400.05321.12
5.4.420.0230.03720.21
5.4.410.0200.05020.17
5.4.400.0370.03319.91
5.4.390.0430.04319.76
5.4.380.0370.06318.61
5.4.370.0300.05318.50
5.4.360.0430.05318.59
5.4.350.0230.07318.75
5.4.340.0230.06018.56
5.4.320.0040.04312.50
5.4.310.0080.03712.50
5.4.300.0040.04012.51
5.4.290.0080.03712.50
5.4.280.0090.03512.39
5.4.270.0070.03812.39
5.4.260.0070.03812.39
5.4.250.0070.03812.40
5.4.240.0050.04012.40
5.4.230.0060.04112.39
5.4.220.0080.04112.39
5.4.210.0090.04912.39
5.4.200.0090.03812.39
5.4.190.0190.06812.39
5.4.180.0110.04512.38
5.4.170.0070.05412.40
5.4.160.0080.04812.39
5.4.150.0070.04312.39
5.4.140.0030.04012.07
5.4.130.0040.03712.07
5.4.120.0070.03412.02
5.4.110.0030.03912.01
5.4.100.0050.03912.01
5.4.90.0100.03312.01
5.4.80.0090.03512.02
5.4.70.0080.03312.01
5.4.60.0100.03512.01
5.4.50.0080.04012.02
5.4.40.0030.04112.00
5.4.30.0080.03712.00
5.4.20.0030.04112.00
5.4.10.0100.03712.00
5.4.00.0050.04111.49
5.3.290.0100.04112.80
5.3.280.0060.03912.71
5.3.270.0040.04212.72
5.3.260.0090.03612.72
5.3.250.0100.03712.72
5.3.240.0070.03712.72
5.3.230.0080.04012.71
5.3.220.0040.03912.68
5.3.210.0090.03612.68
5.3.200.0050.03712.68
5.3.190.0040.03912.68
5.3.180.0070.03512.68
5.3.170.0070.03512.67
5.3.160.0080.03412.68
5.3.150.0070.03712.68
5.3.140.0090.03412.66
5.3.130.0060.03912.66
5.3.120.0060.03912.66
5.3.110.0080.03712.65
5.3.100.0060.03712.12
5.3.90.0080.03612.10
5.3.80.0080.03512.09
5.3.70.0070.03512.09
5.3.60.0060.04212.08
5.3.50.0060.03712.03
5.3.40.0060.03712.03
5.3.30.0060.03511.99
5.3.20.0030.03811.77
5.3.10.0070.03411.73
5.3.00.0070.04111.72
5.2.170.0060.0319.23
5.2.160.0050.0349.23
5.2.150.0040.0369.23
5.2.140.0040.0389.22
5.2.130.0060.0309.18
5.2.120.0040.0319.18
5.2.110.0030.0319.19
5.2.100.0050.0309.19
5.2.90.0030.0349.18
5.2.80.0060.0459.18
5.2.70.0040.0389.18
5.2.60.0070.0289.13
5.2.50.0090.0279.10
5.2.40.0070.0379.07
5.2.30.0100.0369.06
5.2.20.0060.0309.04
5.2.10.0040.0288.94
5.2.00.0060.0278.80
5.1.60.0020.0258.09
5.1.50.0030.0258.09
5.1.40.0040.0258.07
5.1.30.0060.0248.42
5.1.20.0050.0268.44
5.1.10.0040.0268.17
5.1.00.0090.0228.17
5.0.50.0020.0236.64
5.0.40.0050.0186.50
5.0.30.0020.0336.32
5.0.20.0050.0196.29
5.0.10.0040.0206.26
5.0.00.0050.0296.25
4.4.90.0010.0174.78
4.4.80.0030.0144.75
4.4.70.0020.0164.76
4.4.60.0020.0164.75
4.4.50.0040.0144.77
4.4.40.0030.0254.71
4.4.30.0040.0144.76
4.4.20.0020.0164.85
4.4.10.0010.0174.85
4.4.00.0030.0244.76
4.3.110.0030.0164.67
4.3.100.0030.0144.66
4.3.90.0020.0154.64
4.3.80.0010.0264.59
4.3.70.0010.0164.63
4.3.60.0050.0124.63
4.3.50.0020.0164.63
4.3.40.0050.0224.54
4.3.30.0020.0163.30
4.3.20.0030.0153.28
4.3.10.0010.0173.24
4.3.00.0000.02019.48

preferences:
146.89 ms | 1394 KiB | 7 Q