3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Connection {} class Singleton{ static public function get_instance(){ static $i; $i :? $i = new Connection(); return $i; } } class A extends Singleton{} class B extends A{} var_dump(A::get_instance()); var_dump(B::get_instance());

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.380.1230.06718.59
5.4.370.0830.08018.63
5.4.360.1100.06718.50
5.4.350.1170.07018.59
5.4.340.0970.05018.48
5.4.320.1070.04718.74
5.4.310.0770.06018.50
5.4.300.0830.06018.83
5.4.290.1000.06018.61
5.4.280.0700.05718.78
5.4.270.0830.05718.62
5.4.260.0730.06018.78
5.4.250.0900.05318.56
5.4.240.0770.05718.47
5.4.230.0830.05318.71
5.4.220.1030.05718.85
5.4.210.0800.06718.59
5.4.200.0870.05016.62
5.4.190.1070.06018.49
5.4.180.1170.07018.68
5.4.170.0670.05718.71
5.4.160.0830.05718.48
5.4.150.0830.06018.75
5.4.140.0730.05316.18
5.4.130.0830.04316.45
5.4.120.0970.04716.22
5.4.110.0930.06016.22
5.4.100.1000.05016.37
5.4.90.1430.05316.45
5.4.80.0930.05716.21
5.4.70.0900.05716.14
5.4.60.0970.04716.23
5.4.50.1170.06716.20
5.4.40.1430.06716.25
5.4.30.1270.05716.15
5.4.20.1170.05716.18
5.4.10.0870.05316.38
5.4.00.0870.06015.71
5.3.290.1030.05314.70
5.3.280.0930.06314.80
5.3.270.0830.06314.77
5.3.260.0900.06714.71
5.3.250.0800.06014.82
5.3.240.0770.05314.74
5.3.230.0900.05314.71
5.3.220.1430.05714.63
5.3.210.1030.07014.57
5.3.200.1170.05314.62
5.3.190.1370.06014.60
5.3.180.1130.06314.55
5.3.170.0870.06714.60
5.3.160.0930.06314.70
5.3.150.0800.06314.62
5.3.140.0800.04714.57
5.3.130.0600.06014.73
5.3.120.0870.05314.70
5.3.110.0930.05714.58
5.3.100.0700.06314.25
5.3.90.0900.05014.05
5.3.80.0970.05714.12
5.3.70.1170.06714.04
5.3.60.1470.06714.11
5.3.50.0930.05313.98
5.3.40.0970.05714.00
5.3.30.0970.05314.13
5.3.20.0930.06313.77
5.3.10.1030.05013.69
5.3.00.0730.05013.73
5.2.170.0830.04711.19
5.2.160.0730.04711.20
5.2.150.0700.05011.13
5.2.140.1100.04011.21
5.2.130.0630.04311.18
5.2.120.0770.04711.13
5.2.110.0830.04011.23
5.2.100.0630.04711.31
5.2.90.0670.05011.16
5.2.80.0930.04311.12
5.2.70.0970.03311.07
5.2.60.1030.04011.09
5.2.50.0570.04711.11
5.2.40.0630.04011.21
5.2.30.0730.05010.99
5.2.20.0700.04310.98
5.2.10.0300.04310.89
5.2.00.0670.04310.75
5.1.60.0700.04010.07
5.1.50.0600.03710.21
5.1.40.0730.03710.02
5.1.30.0700.05010.33
5.1.20.0600.04310.58
5.1.10.0670.03710.11
5.1.00.0630.03310.05
5.0.50.0230.0338.67
5.0.40.0400.0278.52
5.0.30.0370.0438.36
5.0.20.0270.0378.36
5.0.10.0400.0338.36
5.0.00.0200.0638.36
4.4.90.0270.0308.36
4.4.80.0230.0308.36
4.4.70.0230.0308.36
4.4.60.0200.0278.36
4.4.50.0270.0338.36
4.4.40.0430.0408.36
4.4.30.0530.0278.36
4.4.20.0300.0308.36
4.4.10.0300.0338.36
4.4.00.0270.0408.36
4.3.110.0300.0208.36
4.3.100.0530.0178.36
4.3.90.0400.0238.36
4.3.80.0370.0308.36
4.3.70.0330.0278.36
4.3.60.0470.0208.36
4.3.50.0330.0378.36
4.3.40.0370.0338.36
4.3.30.0200.0208.36
4.3.20.0200.0278.36
4.3.10.0230.0278.36
4.3.00.0030.0207.57

preferences:
141.72 ms | 1394 KiB | 7 Q