3v4l.org

run code in 300+ PHP versions simultaneously
<?php class trial{ public $id; public static $sid; public function show(){ if (trial::$sid) echo trial::$sid; else echo $this->id; } } $obj = new trial(); $obj->id = 1; $obj->show(); echo "\n\n"; trial::$sid = 5; echo trial::show();

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.0080.00816.63
8.3.50.0260.00821.14
8.3.40.0030.01218.96
8.3.30.0030.01218.88
8.3.20.0070.00020.20
8.3.10.0070.00021.90
8.3.00.0090.00019.65
8.2.180.0120.00316.63
8.2.170.0140.00322.96
8.2.160.0170.00020.34
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0030.00617.50
8.2.110.0030.00622.11
8.2.100.0070.00417.75
8.2.90.0060.00319.21
8.2.80.0050.00517.97
8.2.70.0000.00817.63
8.2.60.0000.00818.04
8.2.50.0000.00818.07
8.2.40.0030.00619.36
8.2.30.0040.00419.72
8.2.20.0040.00417.62
8.2.10.0040.00418.04
8.2.00.0040.00418.01
8.1.280.0040.01125.92
8.1.270.0130.00722.00
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.65
8.1.230.0070.00417.42
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0030.00617.10
8.1.180.0040.00418.10
8.1.170.0000.00818.52
8.1.160.0070.00021.88
8.1.150.0040.00418.84
8.1.140.0040.00417.36
8.1.130.0050.00317.65
8.1.120.0040.00417.33
8.1.110.0050.00217.43
8.1.100.0070.00017.41
8.1.90.0040.00417.34
8.1.80.0050.00317.29
8.1.70.0030.00317.41
8.1.60.0030.00617.52
8.1.50.0000.00817.57
8.1.40.0050.00317.56
8.1.30.0040.00417.54
8.1.20.0030.00517.64
8.1.10.0050.00317.50
8.1.00.0070.00017.41
8.0.300.0000.00718.77
8.0.290.0080.00016.88
8.0.280.0030.00318.43
8.0.270.0070.00017.19
8.0.260.0030.00317.18
8.0.250.0060.00317.05
8.0.240.0070.00017.07
8.0.230.0070.00016.93
8.0.220.0000.00716.89
8.0.210.0040.00416.82
8.0.200.0000.00716.96
8.0.190.0060.00316.80
8.0.180.0040.00417.00
8.0.170.0040.00416.96
8.0.160.0030.00316.87
8.0.150.0040.00416.81
8.0.140.0080.00016.73
8.0.130.0030.00313.33
8.0.120.0000.00816.81
8.0.110.0000.00816.90
8.0.100.0040.00416.78
8.0.90.0040.00416.91
8.0.80.0110.00316.93
8.0.70.0040.00416.75
8.0.60.0000.00716.79
8.0.50.0080.00016.95
8.0.30.0080.01017.12
8.0.20.0090.01117.40
8.0.10.0040.00416.87
8.0.00.0080.00916.96
7.4.330.0030.00315.08
7.4.320.0050.00216.42
7.4.300.0000.00716.52
7.4.290.0030.00516.57
7.4.280.0040.00416.51
7.4.270.0060.00016.58
7.4.260.0100.00016.43
7.4.250.0070.00016.49
7.4.240.0020.00516.62
7.4.230.0070.00016.70
7.4.220.0070.01816.42
7.4.210.0060.00916.66
7.4.200.0070.00016.63
7.4.160.0060.00916.66
7.4.150.0130.00417.40
7.4.140.0110.00617.86
7.4.130.0090.00816.59
7.4.120.0060.01016.49
7.4.110.0060.01116.61
7.4.100.0140.00316.46
7.4.90.0090.01016.50
7.4.80.0120.00419.39
7.4.70.0090.00916.54
7.4.60.0160.00016.67
7.4.50.0060.00016.31
7.4.40.0100.00716.71
7.4.30.0130.00916.56
7.4.00.0070.01114.98
7.3.330.0030.00313.38
7.3.320.0000.00513.24
7.3.310.0000.00716.41
7.3.300.0000.00716.31
7.3.290.0080.01016.34
7.3.280.0090.01016.34
7.3.270.0150.00317.40
7.3.260.0120.01216.54
7.3.250.0130.00716.37
7.3.240.0130.00616.45
7.3.230.0110.01116.39
7.3.210.0070.01016.60
7.3.200.0090.00916.58
7.3.190.0150.00316.49
7.3.180.0120.00616.55
7.3.170.0180.00316.59
7.3.160.0210.00316.52
7.3.120.0060.01314.89
7.3.110.0100.01014.61
7.3.100.0100.00314.71
7.3.90.0100.00714.83
7.3.80.0100.00314.86
7.3.70.0080.00814.95
7.3.60.0040.01514.46
7.3.50.0030.01014.87
7.3.40.0060.00314.63
7.3.30.0030.01214.83
7.3.20.0090.00616.82
7.3.10.0060.00616.32
7.3.00.0000.01516.61
7.2.330.0100.01016.48
7.2.320.0070.01116.50
7.2.310.0190.00716.40
7.2.300.0090.00916.76
7.2.290.0060.01616.60
7.2.250.0070.01414.91
7.2.240.0070.01314.79
7.2.230.0070.01015.32
7.2.220.0000.01214.73
7.2.210.0030.01015.04
7.2.200.0130.00014.98
7.2.190.0070.00715.07
7.2.180.0070.01015.24
7.2.170.0060.00315.06
7.2.60.0120.00616.23
7.2.00.0060.01519.39
7.1.330.0030.01015.91
7.1.320.0080.00815.56
7.1.310.0030.01015.76
7.1.300.0090.00915.70
7.1.290.0000.00915.77
7.1.280.0000.01215.75
7.1.270.0100.00615.70
7.1.260.0060.01115.75
7.1.200.0090.00315.70
7.1.100.0060.01217.78
7.1.70.0000.00717.14
7.1.60.0030.02119.13
7.1.50.0140.01016.96
7.1.00.0100.07022.43
7.0.200.0050.00316.46
7.0.60.0100.07019.91
7.0.50.0070.05017.87
7.0.40.0030.04320.40
7.0.30.0570.06720.34
7.0.20.0230.04720.23
7.0.10.0130.06020.33
7.0.00.0070.04020.14
5.6.280.0030.03720.89
5.6.210.0070.05320.78
5.6.200.0070.08318.11
5.6.190.0000.09320.57
5.6.180.4200.03720.61
5.6.170.0270.03320.58
5.6.160.0030.08320.46
5.6.150.0100.07718.21
5.6.140.0070.04018.29
5.6.130.0030.04018.18
5.6.120.0070.04321.04
5.6.110.0130.07721.02
5.6.100.0070.07021.11
5.6.90.0100.04020.96
5.6.80.0030.05320.51
5.6.70.4370.02720.38
5.5.350.0230.07320.34
5.5.340.0100.08017.98
5.5.330.0070.06320.29
5.5.320.0270.05320.31
5.5.310.0230.03720.36
5.5.300.0000.04317.95
5.5.290.0030.08017.99
5.5.280.0030.08320.89
5.5.270.0130.06320.73
5.5.260.0100.08320.96
5.5.250.0200.06320.58
5.5.240.0300.06020.35
5.4.450.0700.08019.46
5.4.440.0700.05319.33
5.4.430.0770.04319.56
5.4.420.0800.05719.32
5.4.410.0730.05719.32
5.4.400.0800.05019.25
5.4.390.0830.05018.83
5.4.380.0830.04319.13
5.4.370.0900.04019.09
5.4.360.0730.05719.08
5.4.350.0830.04718.83
5.4.340.0800.05319.05
5.4.320.0700.06319.08
5.4.310.0870.04319.23
5.4.300.0800.05019.26
5.4.290.0830.04719.00
5.4.280.0770.05719.05
5.4.270.0770.06019.23
5.4.260.0770.05019.24
5.4.250.0800.05319.23
5.4.240.0730.05719.25
5.4.230.0670.04719.33
5.4.220.0700.04719.04
5.4.210.0800.05019.09
5.4.200.0830.04719.23
5.4.190.0830.06719.21
5.4.180.0830.04719.12
5.4.170.0770.05719.33
5.4.160.0830.04319.32
5.4.150.0730.05719.20
5.4.140.0600.05316.46
5.4.130.0800.04716.54
5.4.120.0800.04316.28
5.4.110.0730.05316.28
5.4.100.0800.04316.25
5.4.90.0770.04716.62
5.4.80.0670.05716.63
5.4.70.0070.07016.44
5.4.60.0370.05716.39
5.4.50.0030.06716.47
5.4.40.0130.05716.33
5.4.30.0200.07316.33
5.4.20.0170.03716.48

preferences:
63.49 ms | 401 KiB | 5 Q