3v4l.org

run code in 300+ PHP versions simultaneously
<?php class StaticExample { protected $thingyMoBobber = "Bob"; protected static $thing = "eh!"; public static $castles = "sand castles :3"; public static function playWithThing() { echo self::$thing; } public function heyBob() { echo "hey " . $this->thingyMoBobber; } public static function tryToDoBadThingsWithBob() { echo $this->thingyMoBobber; } } StaticExample::playWithThing(); echo StaticExample::$castles; $staticExample = new StaticExample(); $staticExample->heyBob(); // THESE DO NOT WORK StaticExample::heyBob(); StaticExample::tryToDoBadThingsWithBob();

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.3.60.0120.00618.43
8.3.50.0070.01116.28
8.3.40.0130.00718.75
8.3.30.0170.00318.84
8.3.20.0000.00820.39
8.3.10.0030.00623.67
8.3.00.0170.00019.68
8.2.180.0180.00316.75
8.2.170.0130.01022.96
8.2.160.0070.00720.39
8.2.150.0120.00924.18
8.2.140.0060.01224.66
8.2.130.0030.00526.16
8.2.120.0000.01017.75
8.2.110.0070.00321.11
8.2.100.0090.00318.03
8.2.90.0000.00819.17
8.2.80.0030.00617.97
8.2.70.0060.00317.63
8.2.60.0040.00418.05
8.2.50.0000.00818.07
8.2.40.0030.00521.11
8.2.30.0000.00720.70
8.2.20.0030.00517.67
8.2.10.0000.00818.07
8.2.00.0000.00818.10
8.1.280.0070.01025.92
8.1.270.0130.00623.67
8.1.260.0030.00626.35
8.1.250.0030.00528.09
8.1.240.0060.00321.25
8.1.230.0060.00617.42
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0110.00017.35
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0030.00518.52
8.1.160.0040.00421.96
8.1.150.0050.00318.70
8.1.140.0080.00017.27
8.1.130.0070.00017.70
8.1.120.0040.00417.45
8.1.110.0040.00417.38
8.1.100.0040.00417.49
8.1.90.0050.00217.46
8.1.80.0040.00417.41
8.1.70.0070.00017.32
8.1.60.0050.00317.48
8.1.50.0000.00817.43
8.1.40.0090.00017.54
8.1.30.0060.00617.69
8.1.20.0040.00417.65
8.1.10.0000.00717.48
8.1.00.0000.00717.52
8.0.300.0070.00018.77
8.0.290.0000.00716.75
8.0.280.0000.00818.46
8.0.270.0000.00817.32
8.0.260.0040.00417.25
8.0.250.0040.00416.92
8.0.240.0000.00617.04
8.0.230.0030.00316.93
8.0.220.0070.00017.00
8.0.210.0030.00316.97
8.0.200.0040.00417.03
8.0.190.0040.00417.09
8.0.180.0000.00716.99
8.0.170.0030.00316.98
8.0.160.0050.00316.98
8.0.150.0000.00916.94
8.0.140.0000.00716.94
8.0.130.0060.00013.32
8.0.120.0020.00516.98
8.0.110.0000.00816.96
8.0.100.0050.00316.75
8.0.90.0040.00416.77
8.0.80.0030.01216.88
8.0.70.0040.00416.77
8.0.60.0000.00716.93
8.0.50.0050.00316.81
8.0.30.0100.00817.06
8.0.20.0060.01217.40
8.0.10.0000.00717.05
8.0.00.0100.00716.71
7.4.330.0030.00315.08
7.4.320.0030.00316.46
7.4.300.0040.00416.52
7.4.290.0080.00016.59
7.4.280.0030.00316.57
7.4.270.0000.00716.42
7.4.260.0070.00016.42
7.4.250.0040.00416.54
7.4.240.0040.00316.62
7.4.230.0070.00016.68
7.4.220.0060.01316.45
7.4.210.0090.00916.50
7.4.200.0000.00716.63
7.4.160.0100.00616.47
7.4.150.0060.01117.40
7.4.140.0110.00717.86
7.4.130.0080.01016.56
7.4.120.0140.00616.49
7.4.110.0030.01416.31
7.4.100.0090.00916.43
7.4.90.0170.00316.48
7.4.80.0140.00719.39
7.4.70.0070.01316.47
7.4.60.0140.00716.62
7.4.50.0040.00416.27
7.4.40.0120.00616.47
7.4.30.0030.01316.44
7.4.00.0030.01315.10
7.3.330.0000.00613.28
7.3.320.0030.00313.20
7.3.310.0040.00416.42
7.3.300.0000.00616.38
7.3.290.0080.00916.31
7.3.280.0070.00916.31
7.3.270.0140.00317.40
7.3.260.0090.01516.43
7.3.250.0110.00816.42
7.3.240.0150.00316.56
7.3.230.0080.00916.57
7.3.210.0150.00616.27
7.3.200.0090.01316.40
7.3.190.0110.00716.54
7.3.180.0060.01116.29
7.3.170.0120.01416.45
7.3.160.0090.00916.56
7.3.120.0080.00314.88
7.3.110.0000.01414.90
7.3.100.0050.00514.90
7.3.90.0070.00714.58
7.3.80.0090.00614.81
7.3.70.0040.01114.88
7.3.60.0000.01514.66
7.3.50.0100.00314.82
7.3.40.0040.01114.61
7.3.30.0090.00314.41
7.3.20.0060.00616.55
7.3.10.0000.01216.52
7.3.00.0070.00716.57
7.2.330.0070.01816.88
7.2.320.0110.01116.38
7.2.310.0060.01616.84
7.2.300.0070.01016.79
7.2.290.0090.00916.50
7.2.240.0090.00614.90
7.2.230.0000.01315.00
7.2.220.0070.00715.20
7.2.210.0120.00314.77
7.2.200.0070.00315.13
7.2.190.0060.00915.19
7.2.180.0030.01314.79
7.2.170.0090.00915.20
7.2.160.0090.00614.65
7.2.150.0000.01716.61
7.2.140.0060.01016.73
7.2.130.0060.00616.81
7.2.120.0120.00317.02
7.2.110.0040.01116.60
7.2.100.0040.01217.14
7.2.90.0070.01016.82
7.2.80.0040.01116.76
7.2.70.0070.00717.03
7.2.60.0070.00816.78
7.2.50.0030.00716.74
7.2.40.0120.00316.83
7.2.30.0040.01416.77
7.2.20.0090.00016.95
7.2.10.0110.00316.99
7.2.00.0080.00618.29
7.1.330.0070.00715.39
7.1.320.0040.00715.61
7.1.310.0030.00915.78
7.1.300.0120.00315.67
7.1.290.0100.00015.63
7.1.280.0090.00315.57
7.1.270.0040.00815.76
7.1.260.0000.01015.45
7.1.250.0090.00415.58
7.1.200.0060.00615.71
7.1.100.0060.00617.92
7.1.70.0040.00416.97
7.1.60.0130.01319.29
7.1.50.0000.01416.81
7.1.00.0000.08022.36
7.0.200.0000.01016.77
7.0.60.0100.07019.88
7.0.50.0070.08017.86
7.0.40.0000.04720.23
7.0.30.0300.05020.08
7.0.20.0270.07320.08
7.0.10.0200.07720.24
7.0.00.0030.04320.19
5.6.280.0000.04021.07
5.6.210.0000.08020.70
5.6.200.0070.08718.26
5.6.190.0100.03720.43
5.6.180.0300.07720.77
5.6.170.0370.07020.44
5.6.160.0100.08020.46
5.6.150.0070.05318.30
5.6.140.0170.05018.28
5.6.130.0070.03718.17
5.6.120.0030.04321.01
5.6.110.0070.08720.99
5.6.100.0030.04321.13
5.6.90.0100.03721.02
5.6.80.0100.08020.44
5.5.350.0030.07720.34
5.5.340.0070.04318.04
5.5.330.0030.04020.35
5.5.320.2970.04020.25
5.5.310.0270.05020.24
5.5.300.0030.04018.02
5.5.290.0030.08317.95
5.5.280.0070.08720.70
5.5.270.0100.08020.76
5.5.260.0070.06720.69
5.5.250.0130.07720.59
5.5.240.0030.08020.27
5.4.450.0700.05319.57
5.4.440.0730.06019.61
5.4.430.0530.05319.42
5.4.420.0600.06019.33
5.4.410.0530.06019.55
5.4.400.0630.04719.25
5.4.390.0500.06719.02
5.4.380.0630.05719.10
5.4.370.0500.05319.32
5.4.360.0500.05719.28
5.4.350.0630.06719.27
5.4.340.0670.07319.06
5.4.320.0730.03719.15
5.4.310.0600.05019.25
5.4.300.0300.06019.24
5.4.290.0200.06319.01
5.4.280.0200.06319.28
5.4.270.0630.05319.28
5.4.260.0670.06319.05
5.4.250.0670.06019.25
5.4.240.0670.04719.11
5.4.230.0530.06319.21
5.4.220.0500.06018.84
5.4.210.0500.06019.24
5.4.200.0470.06318.93
5.4.190.0570.06719.10
5.4.180.0530.05018.82
5.4.170.0500.05719.11
5.4.160.0630.05019.27
5.4.150.0700.04319.22
5.4.140.0600.05016.55
5.4.130.0670.05016.34
5.4.120.0130.06316.55
5.4.110.0130.05016.53
5.4.100.0170.06016.60
5.4.90.0700.04716.28
5.4.80.0800.06016.43
5.4.70.0170.06716.44
5.4.60.0070.06316.53
5.4.50.0070.07316.22
5.4.40.0300.03716.52
5.4.30.0170.03316.34
5.4.20.0000.07316.55

preferences:
55.22 ms | 400 KiB | 5 Q