3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Singleton { protected static $instance; final public static function getInstance() { if (!isset(static::$instance)) { static::$instance = new static; } return static::$instance; } } abstract class Abudabia { use Sigleton; } class a1 extends Abudabia { public function set { return 'allah ahbar'; } } class a2 extends Abudabia { public function get { return 'algazira'; } } $a = a1::getInstance(); $b = a2::getInstance(); var_dump($a->set(),$b->get());

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.340.0070.04512.04
5.4.320.0060.03712.52
5.4.310.0060.03912.52
5.4.300.0040.03812.52
5.4.290.0100.03412.52
5.4.280.0050.03712.41
5.4.270.0040.04312.41
5.4.260.0110.04812.41
5.4.250.0040.04712.41
5.4.240.0070.04112.41
5.4.230.0080.03512.41
5.4.220.0050.03812.40
5.4.210.0040.03712.41
5.4.200.0060.04012.40
5.4.190.0080.04312.40
5.4.180.0080.03412.40
5.4.170.0030.04512.41
5.4.160.0080.03812.41
5.4.150.0070.03512.40
5.4.140.0050.03912.09
5.4.130.0070.04612.07
5.4.120.0050.03612.04
5.4.110.0070.03912.04
5.4.100.0050.05012.04
5.4.90.0030.04012.04
5.4.80.0040.04312.04
5.4.70.0040.04612.03
5.4.60.0050.03612.03
5.4.50.0040.04112.04
5.4.40.0080.03112.02
5.4.30.0060.03712.02
5.4.20.0060.03412.01
5.4.10.0060.03612.01
5.4.00.0040.03711.51
5.3.290.0060.03912.80
5.3.280.0050.03812.71
5.3.270.0050.04012.73
5.3.260.0100.03412.71
5.3.250.0030.03912.71
5.3.240.0050.03812.71
5.3.230.0040.04112.71
5.3.220.0090.03412.68
5.3.210.0070.03712.68
5.3.200.0040.03812.68
5.3.190.0050.03812.68
5.3.180.0070.03912.68
5.3.170.0070.03512.66
5.3.160.0060.04312.68
5.3.150.0050.03812.67
5.3.140.0090.03312.66
5.3.130.0060.03912.66
5.3.120.0060.03912.66
5.3.110.0090.03812.66
5.3.100.0070.03912.12
5.3.90.0070.03512.08
5.3.80.0050.03712.07
5.3.70.0060.04312.07
5.3.60.0100.04012.06
5.3.50.0060.04212.00
5.3.40.0070.03612.00
5.3.30.0050.04511.95
5.3.20.0050.03511.73
5.3.10.0040.03711.70
5.3.00.0100.03811.68
5.2.170.0070.0289.18
5.2.160.0090.0259.18
5.2.150.0070.0419.18
5.2.140.0060.0349.18
5.2.130.0050.0359.14
5.2.120.0030.0309.14
5.2.110.0060.0289.15
5.2.100.0040.0299.14
5.2.90.0070.0359.14
5.2.80.0090.0369.14
5.2.70.0030.0349.14
5.2.60.0060.0319.09
5.2.50.0040.0319.06
5.2.40.0020.0409.03
5.2.30.0050.0379.01
5.2.20.0010.0329.00
5.2.10.0040.0388.92
5.2.00.0040.0318.79
5.1.60.0050.0278.06
5.1.50.0040.0258.06
5.1.40.0040.0258.05
5.1.30.0070.0248.40
5.1.20.0030.0288.41
5.1.10.0060.0258.14
5.1.00.0040.0268.14
5.0.50.0030.0316.62
5.0.40.0030.0226.48
5.0.30.0040.0326.29
5.0.20.0040.0186.26
5.0.10.0030.0206.25
5.0.00.0030.0316.23
4.4.90.0060.0214.78
4.4.80.0070.0184.76
4.4.70.0030.0164.76
4.4.60.0030.0204.75
4.4.50.0050.0184.77
4.4.40.0050.0294.71
4.4.30.0040.0144.76
4.4.20.0030.0164.84
4.4.10.0060.0134.85
4.4.00.0040.0324.76
4.3.110.0030.0164.66
4.3.100.0030.0154.67
4.3.90.0040.0144.63
4.3.80.0030.0244.58
4.3.70.0010.0224.63
4.3.60.0050.0124.62
4.3.50.0050.0164.63
4.3.40.0030.0264.54
4.3.30.0000.0183.29
4.3.20.0010.0173.26
4.3.10.0030.0153.22
4.3.00.0070.02310.38

preferences:
139.55 ms | 1398 KiB | 7 Q