3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { //类常量 const constValue = "constValue"; //类属性 public property = "properties"; //静态属性 static public staticProperty = "staticProperty"; //普通函数 public function func() { } //静态函数 static public staticFunc() { } } $xxoo = new A; //访问实例的属性 print $xxoo->property; //访问实例的函数 print $xxoo->func(); //也可以借助实例来访问静态成员 print $xxoo->staticFunc(); //如果不借助实例,那就直接用类名加双冒号 print A::staticFunc(); print A::constValue;

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.110.0100.05316.34
5.4.100.0000.07716.39
5.4.90.0030.04716.54
5.4.80.0100.06316.49
5.4.70.0030.06316.49
5.4.60.0100.03316.52
5.4.50.0070.06316.52
5.4.40.0000.05316.36
5.4.30.0000.06716.39
5.4.20.0070.03016.39
5.4.10.0030.05016.34
5.4.00.0000.05015.63
5.3.210.0000.05014.64
5.3.200.0000.07314.47
5.3.190.0030.08014.62
5.3.180.0070.06714.46
5.3.170.0070.06714.52
5.3.160.0070.06714.42
5.3.150.0070.07014.65
5.3.140.0000.07714.51
5.3.130.0070.06314.56
5.3.120.0070.05014.58
5.3.110.0030.05714.64
5.3.100.0030.04314.09
5.3.90.0070.04714.04
5.3.80.0030.06014.07
5.3.70.0000.06714.05
5.3.60.0000.07313.96
5.3.50.0070.05013.99
5.3.40.0070.06314.01
5.3.30.0030.07013.96
5.3.20.0000.06013.65
5.3.10.0030.07313.70
5.3.00.0030.06713.72

preferences:
139.66 ms | 1394 KiB | 7 Q