3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // Función Function suma ($valor) { //la función if($valor >0 and $valor <= 10){ //formula de la función $total=0; for ($i = 1; $i <= $valor; $i++){ //sentencias de la función $total=$total+$i; } echo "Valor sumatoria =$total \n"; // permite establecer la cadena }else { echo "Sumatoria no cumple condición $valor \n"; // en caso de números negativos } } print (suma (10)); /* Mensaje x pantalla */ ?>
based on 4SLW7

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.3.10.0080.00516.68
7.3.00.0090.00516.48
7.2.130.0050.00817.00
7.2.120.0080.00516.89
7.2.110.0030.01217.01
7.2.100.0090.00616.89
7.2.90.0050.00716.99
7.2.80.0040.00716.91
7.2.70.0020.00916.96
7.2.60.0100.00516.90
7.2.50.0050.00716.92
7.2.40.0070.00916.86
7.2.30.0090.00516.99
7.2.20.0030.01217.10
7.2.10.0050.00916.80
7.2.00.0030.01017.64
7.1.250.0050.00715.59
7.1.240.0070.00715.70
7.1.230.0040.00815.46
7.1.220.0040.01115.66
7.1.210.0000.01415.63
7.1.200.0070.00815.48
7.1.190.0080.00415.78
7.1.180.0060.00915.94
7.1.170.0030.00615.50
7.1.160.0040.00415.88
7.1.150.0080.00415.43
7.1.140.0000.01115.64
7.1.130.0000.01315.76
7.1.120.0060.00915.79
7.1.110.0060.00615.50
7.1.100.0060.00716.79
7.1.90.0000.00815.66
7.1.80.0040.00415.73
7.1.70.0040.00716.40
7.1.60.0330.00824.28
7.1.50.0350.00524.21
7.1.40.0320.00823.86
7.1.30.0230.01823.90
7.1.20.0270.01324.15
7.1.10.0250.00615.10
7.1.00.0370.00815.13
7.0.330.0090.00315.32
7.0.320.0060.01015.05
7.0.310.0050.00315.27
7.0.300.0070.00415.42
7.0.290.0030.01015.50
7.0.280.0060.00615.36
7.0.270.0030.00615.51
7.0.260.0040.00415.46
7.0.250.0100.00015.40
7.0.240.0030.01015.37
7.0.230.0060.00315.54
7.0.220.0100.00315.45
7.0.210.0060.00615.56
7.0.200.0290.00515.28
7.0.190.0310.00315.13
7.0.180.0250.01115.02
7.0.170.0250.01014.89
7.0.160.0280.00615.01
7.0.150.0240.00714.95
7.0.140.0270.00714.90
7.0.130.0550.00715.03
7.0.120.0300.00514.97
7.0.110.0270.00714.88
7.0.100.0270.00814.90
7.0.90.0230.01014.96
7.0.80.0230.00814.95
7.0.70.0250.00914.95
7.0.60.0250.01014.89
7.0.50.0290.01015.02
7.0.40.0230.01013.91
7.0.30.0270.01014.03
7.0.20.0250.00814.02
7.0.10.0250.00713.79
7.0.00.0250.01014.20
hhvm-3.15.40.0670.12385.25
5.6.380.0090.00013.98
5.6.300.0100.05020.65
5.6.290.0000.06320.71
5.6.280.0030.05720.78
5.6.270.0100.05320.87
5.6.260.0170.04721.03
5.6.250.0070.06020.79
5.6.240.0070.05720.94
5.6.230.0070.05720.75
5.6.220.0100.05320.80
5.6.210.0030.05720.50
5.6.200.0100.06320.88
5.6.190.0070.06320.72
5.6.180.0000.06020.69
5.6.170.0030.06020.82
5.6.160.0070.06020.72
5.6.150.0130.05720.92
5.6.140.0130.05720.71
5.6.130.0070.05720.82
5.6.120.0030.08020.80
5.6.110.0000.06720.81
5.6.100.0200.04720.93
5.6.90.0130.05720.86
5.6.80.0130.05020.11
5.6.70.0130.06320.25
5.6.60.0070.05720.11
5.6.50.0070.05320.27
5.6.40.0100.06320.30
5.6.30.0100.05320.08
5.6.20.0130.05020.11
5.6.10.0070.05320.04
5.6.00.0070.05320.21