3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { public static $foo = 'foo'; public $thisvars = array(); public $selfvars = array(); public $staticvars = array(); public function __construct() { $this->addFoo(); } public function addFoo() { $this->selfvars[] = self::$foo; $this->staticvars[] = static::$foo; $this->thisvars[] = $this::$foo; } } class B extends A { public static $foo = 'bar'; public function __construct() { parent::__construct(); $this->addFoo(); } } $b = new B; print_r($b->selfvars); print_r($b->staticvars); print_r($b->thisvars); class C { public static $foo = 'foo'; public $vars = array(); public function __construct() { $this->addFoo(__CLASS__); } public function addFoo($class) { $this->vars[] = $class::$foo; } } class D extends C { public static $foo = 'bar'; public function __construct() { parent::__construct(); $this->addFoo(__CLASS__); } } $d = new D; print_r($d->vars);

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)
8.5.70.0050.00518.75
8.5.60.0120.00518.41
8.5.50.0050.01218.29
8.5.30.0060.00317.61
8.5.20.0080.01022.05
8.5.10.0100.01116.65
8.5.00.0120.01020.08
8.4.220.0160.00921.27
8.4.210.0130.00921.53
8.4.180.0150.00819.79
8.4.170.0160.01019.42
8.4.160.0120.01024.05
8.4.150.0090.00316.96
8.4.140.0120.01017.35
8.4.130.0060.00317.90
8.4.120.0110.00923.90
8.4.110.0130.00618.96
8.4.100.0060.00318.91
8.4.90.0080.00520.94
8.4.80.0140.00617.99
8.4.70.0110.01219.74
8.4.60.0130.00919.66
8.4.50.0090.01022.53
8.4.40.0130.00717.86
8.4.30.0100.01020.62
8.4.20.0060.00319.61
8.4.10.0030.00620.70
8.3.310.0130.00720.27
8.3.300.0120.00820.80
8.3.290.0110.00918.38
8.3.280.0150.00720.17
8.3.270.0120.00816.70
8.3.260.0090.01017.05
8.3.250.0080.01118.81
8.3.240.0100.00916.86
8.3.230.0140.00516.44
8.3.220.0130.00619.05
8.3.210.0110.00716.51
8.3.200.0100.00916.32
8.3.190.0100.00817.00
8.3.180.0110.00816.66
8.3.170.0060.00316.53
8.3.160.0090.00018.40
8.3.150.0160.00317.11
8.3.140.0050.00318.98
8.3.130.0000.00818.36
8.3.120.0140.00418.97
8.3.110.0040.00420.94
8.3.100.0090.00024.06
8.3.90.0090.00026.77
8.3.80.0060.00319.36
8.3.70.0180.00016.58
8.3.60.0040.01818.55
8.3.50.0170.00323.71
8.3.40.0070.00721.76
8.3.30.0070.00718.84
8.3.20.0000.00724.18
8.3.10.0000.00824.66
8.3.00.0080.00026.16
8.2.310.0110.00718.00
8.2.300.0130.00717.93
8.2.290.0090.00820.30
8.2.280.0130.00620.13
8.2.270.0110.00716.75
8.2.260.0120.00618.74
8.2.250.0040.00418.49
8.2.240.0060.00317.04
8.2.230.0060.00922.58
8.2.220.0070.00037.54
8.2.210.0000.00826.77
8.2.200.0090.00018.88
8.2.190.0070.01116.58
8.2.180.0070.01125.92
8.2.170.0070.00719.06
8.2.160.0100.00322.96
8.2.150.0060.00325.66
8.2.140.0000.00724.66
8.2.130.0000.00726.16
8.2.120.0070.00026.35
8.2.110.0050.00520.41
8.2.100.0090.00617.71
8.2.90.0080.00017.75
8.2.80.0000.00818.91
8.2.70.0030.00617.50
8.2.60.0080.00017.50
8.2.50.0030.00517.63
8.2.40.0030.00719.60
8.2.30.0060.00319.25
8.2.20.0040.00418.07
8.2.10.0040.00419.31
8.2.00.0050.00319.15
8.1.340.0110.00817.54
8.1.330.0100.00921.89
8.1.320.0070.00816.11
8.1.310.0000.00816.83
8.1.300.0060.00317.94
8.1.290.0090.00030.84
8.1.280.0110.00325.92
8.1.270.0040.00423.99
8.1.260.0040.00428.09
8.1.250.0030.00628.09
8.1.240.0030.00620.48
8.1.230.0110.00022.14
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0050.00317.35
8.1.190.0040.00417.23
8.1.180.0060.00618.10
8.1.170.0000.00718.84
8.1.160.0070.00018.89
8.1.150.0000.00918.84
8.1.140.0060.00318.84
8.1.130.0030.00620.12
8.1.120.0000.00717.42
8.1.110.0000.00817.34
8.1.100.0040.00417.42
8.1.90.0000.00717.46
8.1.80.0090.00017.35
8.1.70.0030.00317.29
8.1.60.0030.00617.48
8.1.50.0030.00517.51
8.1.40.0040.00417.45
8.1.30.0060.00317.51
8.1.20.0100.00017.70
8.1.10.0070.00017.52
8.1.00.0000.00817.57
8.0.300.0060.00618.77
8.0.290.0070.00016.63
8.0.280.0000.00718.38
8.0.270.0040.00416.77
8.0.260.0080.00018.41
8.0.250.0080.00016.78
8.0.240.0000.00716.79
8.0.230.0000.00716.89
8.0.220.0050.00316.85
8.0.210.0040.00416.75
8.0.200.0030.00316.87
8.0.190.0040.00416.93
8.0.180.0000.00716.82
8.0.170.0080.00016.86
8.0.160.0000.00716.75
8.0.150.0070.00016.66
8.0.140.0030.00616.79
8.0.130.0000.00613.24
8.0.120.0040.00416.80
8.0.110.0040.00416.94
8.0.100.0000.00716.67
8.0.90.0000.00716.67
8.0.80.0080.01016.83
8.0.70.0040.00416.70
8.0.60.0050.00216.72
8.0.50.0060.00316.72
8.0.30.0130.01017.05
8.0.20.0110.00816.99
8.0.10.0000.00716.95
8.0.00.0040.02216.82
7.4.330.0000.00515.55
7.4.320.0030.00316.44
7.4.300.0030.00516.55
7.4.290.0040.00416.65
7.4.280.0030.00916.50
7.4.270.0030.00516.61
7.4.260.0060.00013.27
7.4.250.0030.00316.55
7.4.240.0070.00016.62
7.4.230.0030.00316.26
7.4.220.0020.00516.70
7.4.210.0040.01116.62
7.4.200.0030.00516.61
7.4.130.0090.00916.41
7.4.120.0070.01116.29
7.4.110.0190.01116.55
7.4.100.0200.01016.56
7.4.90.0170.01516.56
7.4.80.0200.01116.53
7.4.70.0160.01416.47
7.4.60.0220.01016.47
7.4.50.0310.00316.58
7.4.40.0250.01116.22
7.4.30.0140.01416.56
7.4.20.0230.00716.40
7.4.10.0180.01916.24
7.4.00.0060.01216.47
7.3.330.0000.00716.25
7.3.320.0050.00013.30
7.3.310.0030.00316.37
7.3.300.0030.00316.21
7.3.290.0070.00616.38
7.3.260.0130.01016.64
7.3.230.0450.02716.31
7.3.220.0290.00416.28
7.3.210.0240.01016.29
7.3.200.0260.00716.24
7.3.190.0310.00316.43
7.3.180.0240.00916.65
7.3.170.0270.00716.56
7.3.160.0180.01716.30
7.3.150.0290.00316.29
7.3.140.0300.00416.26
7.3.130.0270.00816.35
7.3.120.0160.01616.38
7.3.110.0220.00816.38
7.3.100.0140.01716.34
7.3.90.0250.00616.49
7.3.80.0260.00716.70
7.3.70.0250.00816.50
7.3.60.0270.00516.39
7.3.50.0220.01016.47
7.3.40.0230.01316.47
7.3.30.0230.01616.27
7.3.20.0270.00716.57
7.3.10.0530.00416.41
7.3.00.0270.01016.40
7.2.340.0160.01316.39
7.2.330.0170.01416.70
7.2.320.0190.01116.70
7.2.310.0280.00316.43
7.2.300.0250.01116.38
7.2.290.0200.01216.49
7.2.280.0210.00916.57
7.2.270.0250.00716.67
7.2.260.0180.01416.61
7.2.250.0280.00616.57
7.2.240.0160.01316.56
7.2.230.0270.00416.37
7.2.220.0190.00816.68
7.2.210.0290.00316.41
7.2.200.0180.01616.56
7.2.190.0220.01016.57
7.2.180.0390.00016.46
7.2.170.0180.01516.58
7.2.160.0200.01116.66
7.2.150.0310.00416.63
7.2.140.0340.00016.64
7.2.130.0230.01116.74
7.2.120.0290.00916.68
7.2.110.0290.00716.75
7.2.100.0340.01316.56
7.2.90.0370.00316.62
7.2.80.0280.01816.69
7.2.70.0290.01316.69
7.2.60.0280.01316.48
7.2.50.0240.01816.67
7.2.40.0350.00716.73
7.2.30.0260.01816.70
7.2.20.0310.01416.48
7.2.10.0330.01216.53
7.2.00.0250.01216.59

preferences:
129.07 ms | 1541 KiB | 5 Q