3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace miSuperEspacioDeNombres; class nombreclase { function __construct() { echo __METHOD__,"\n"; } } function nombrefunc() { echo __FUNCTION__,"\n"; } const nombreconst = "global"; /* $a = 'nombreclase'; $obj = new $a; // imprime nombreclase::__construct $b = 'nombrefunc'; $b(); // imprime nombrefunc echo constant('nombreconst'), "\n"; // imprime global */ $aa = new nombreclase; nombrefunc(); echo '"' . __NAMESPACE__ . '"'; echo namespace; ?>

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.4.230.0180.04412.38
5.4.220.0170.04112.38
5.4.210.0190.03812.38
5.4.200.0180.04112.38
5.4.190.0140.04512.38
5.4.180.0120.04712.38
5.4.170.0090.04912.39
5.4.160.0150.04412.38
5.4.150.0170.04412.38
5.4.140.0120.04512.07
5.4.130.0160.04312.05
5.4.120.0140.04512.02
5.4.110.0230.06312.01
5.4.100.0140.04412.01
5.4.90.0100.04912.01
5.4.80.0140.04312.01
5.4.70.0140.04612.00
5.4.60.0150.04212.01
5.4.50.0110.04612.00
5.4.40.0180.03911.99
5.4.30.0150.04311.99
5.4.20.0140.04311.99
5.4.10.0150.04211.99
5.4.00.0120.04711.48
5.3.280.0270.04612.70
5.3.270.0270.03812.72
5.3.260.0240.04212.72
5.3.250.0440.11512.71
5.3.240.0180.04312.72
5.3.230.0200.04712.71
5.3.220.0130.05012.68
5.3.210.0210.04012.68
5.3.200.0200.04312.68
5.3.190.0160.04712.68
5.3.180.0230.07012.68
5.3.170.0150.04612.67
5.3.160.0140.04612.68
5.3.150.0210.04412.67
5.3.140.0230.04012.66
5.3.130.0330.09112.66
5.3.120.0130.04912.65
5.3.110.0190.04312.66
5.3.100.0160.04512.12
5.3.90.0190.04212.08
5.3.80.0170.04912.08
5.3.70.0210.04012.08
5.3.60.0150.04412.06
5.3.50.0180.04212.00
5.3.40.0160.04612.00
5.3.30.0160.04311.96
5.3.20.0110.04811.74
5.3.10.0180.03811.70
5.3.00.0180.04511.68

preferences:
133.99 ms | 1394 KiB | 7 Q