3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<!DOCTYPE html> <html> <body> <?php class testClass { public $flagName; public $message; } $a1 = new testClass(); $a1->flagname = "LTV Under 50"; $a1->message = "green"; $a2 = new testClass(); $a2->flagname = "Blue"; $a2->message = "Yellow"; $a3 = array_merge($a1,$a2); print_r($a3); $a1=(object) array("flagname"=>"LTV Under 50","b"=>"green"); $a2=(object) array("flagname"=>"blue","b"=>"yellow"); $a1 = array_merge($a1,$a2); print_r($a1); ?> </body> </html>

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.110.0080.00516.75
7.2.80.0070.00716.83
7.2.60.0080.00616.61
7.2.00.0030.00919.38
7.1.200.0000.01415.69
7.1.100.0000.01118.21
7.1.70.0040.00417.13
7.1.60.0070.01519.46
7.1.50.0110.00716.77
7.1.00.0100.06722.29
7.0.200.0000.01516.47
7.0.140.0030.07722.00
7.0.60.0070.04719.92
7.0.50.0070.07717.87
7.0.40.0070.07720.17
7.0.30.0330.03320.26
7.0.20.0330.04320.34
7.0.10.0100.04320.21
7.0.00.0030.08020.22
5.6.280.0030.07321.11
5.6.210.0070.06020.47
5.6.200.0100.04718.30
5.6.190.0030.08720.52
5.6.180.0070.06720.58
5.6.170.0330.07020.57
5.6.160.0070.04720.61
5.6.150.0130.07018.16
5.6.140.0030.08718.27
5.6.130.0030.04018.26
5.6.120.0130.07321.12
5.6.110.0070.03721.02
5.6.100.0070.05320.98
5.6.90.0100.08320.96
5.6.80.0130.06320.28
5.5.350.0000.08320.43
5.5.340.0030.05718.00
5.5.330.0070.07020.56
5.5.320.0330.07320.42
5.5.310.0300.07720.41
5.5.300.0100.03717.98
5.5.290.0070.07317.99
5.5.280.0070.08020.85
5.5.270.0070.06020.96
5.5.260.0100.07020.64
5.5.250.0100.07720.67
5.5.240.0100.07320.26
5.4.450.0230.03719.42
5.4.440.0330.04719.64
5.4.430.0870.06719.22
5.4.420.1000.06319.30
5.4.410.0100.05719.52
5.4.400.1170.05019.02
5.4.390.0870.05718.96
5.4.380.0100.05718.53
5.4.370.0100.05318.84
5.4.360.0030.06018.61
5.4.350.0130.05318.51
5.4.340.0300.03318.78
5.4.320.0050.03812.50
5.4.310.0060.04312.49
5.4.300.0030.03812.49
5.4.290.0070.06112.49
5.4.280.0110.05012.39
5.4.270.0080.04812.39
5.4.260.0070.05212.39
5.4.250.0100.04912.39
5.4.240.0050.05612.39
5.4.230.0080.05212.38
5.4.220.0120.04512.38
5.4.210.0120.04312.38
5.4.200.0080.05112.39
5.4.190.0110.04612.38
5.4.180.0150.04612.38
5.4.170.0110.04812.39
5.4.160.0060.05012.39
5.4.150.0130.04512.38
5.4.140.0100.07712.07
5.4.130.0050.04912.05
5.4.120.0070.05212.02
5.4.110.0080.04912.01
5.4.100.0090.04512.01
5.4.90.0070.05112.00
5.4.80.0100.04912.01
5.4.70.0100.04512.00
5.4.60.0070.04812.00
5.4.50.0050.05412.00
5.4.40.0090.04811.99
5.4.30.0060.05111.99
5.4.20.0170.07711.99
5.4.10.0160.06511.99
5.4.00.0080.04911.48
5.3.290.0060.03912.80
5.3.280.0160.07212.71
5.3.270.0130.05512.73
5.3.260.0110.05012.72
5.3.250.0090.04512.72
5.3.240.0150.05212.72
5.3.230.0090.04912.71
5.3.220.0150.04512.68
5.3.210.0090.05512.68
5.3.200.0090.04912.68
5.3.190.0100.04512.68
5.3.180.0210.06912.67
5.3.170.0130.08012.67
5.3.160.0090.05512.68
5.3.150.0070.05512.68
5.3.140.0080.05312.66
5.3.130.0060.05712.66
5.3.120.0070.05612.66
5.3.110.0070.05212.66
5.3.100.0120.05312.11
5.3.90.0070.05612.09
5.3.80.0080.05212.08
5.3.70.0060.05212.09
5.3.60.0110.04712.07
5.3.50.0070.05112.02
5.3.40.0050.05512.02
5.3.30.0090.05211.98
5.3.20.0080.06311.76
5.3.10.0060.05711.72
5.3.00.0120.05111.71
5.2.170.0150.0669.21
5.2.160.0120.0459.21
5.2.150.0070.0489.21
5.2.140.0090.0459.21
5.2.130.0090.0429.17
5.2.120.0070.0749.17
5.2.110.0100.0609.18
5.2.100.0120.0569.17
5.2.90.0100.0409.18
5.2.80.0070.0449.17
5.2.70.0090.0439.17
5.2.60.0080.0479.12
5.2.50.0100.0439.09
5.2.40.0100.0419.07
5.2.30.0070.0669.05
5.2.20.0080.0459.03
5.2.10.0140.0568.94
5.2.00.0160.0848.80
5.1.60.0170.0548.08
5.1.50.0170.0548.07
5.1.40.0050.0398.06
5.1.30.0070.0398.41
5.1.20.0050.0428.43
5.1.10.0080.0368.15
5.1.00.0090.0368.15
5.0.50.0080.0286.63
5.0.40.0030.0336.50
5.0.30.0050.0446.31
5.0.20.0020.0316.28
5.0.10.0050.0326.25
5.0.00.0080.0776.25
4.4.90.0020.0244.78
4.4.80.0070.0284.75
4.4.70.0040.0204.75
4.4.60.0030.0224.75
4.4.50.0050.0204.77
4.4.40.0040.0354.71
4.4.30.0080.0464.76
4.4.20.0090.0514.84
4.4.10.0070.0454.85
4.4.00.0060.0644.76
4.3.110.0100.0374.67
4.3.100.0110.0244.66
4.3.90.0120.0334.64
4.3.80.0020.0424.59
4.3.70.0040.0254.63
4.3.60.0070.0234.63
4.3.50.0080.0254.63
4.3.40.0030.0364.54
4.3.30.0020.0333.30
4.3.20.0030.0373.28
4.3.10.0080.0263.24
4.3.00.0170.01712.57