3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Produce { public $number = 0; public function __construct($amount = 0) { $this->number = $amount; } } class Potatoes extends Produce { } class Apples extends Produce { } $potatoes = new Potatoes(23); $apples = new Apples(12); echo 'Number of potatoes: '.$potatoes->number."\n"; echo 'Number of apples: '.$apples->number."\n";

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.0060.00916.75
8.3.50.0140.00018.06
8.3.40.0070.00718.70
8.3.30.0110.00418.82
8.3.20.0000.00720.34
8.3.10.0050.00323.66
8.3.00.0000.00819.68
8.2.180.0070.01416.38
8.2.170.0140.00022.96
8.2.160.0170.00318.81
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0040.00419.30
8.2.120.0070.00026.35
8.2.110.0040.00722.08
8.2.100.0070.00417.66
8.2.90.0030.00617.75
8.2.80.0030.00617.97
8.2.70.0030.00517.63
8.2.60.0040.00417.50
8.2.50.0050.00318.04
8.2.40.0000.00819.35
8.2.30.0030.00519.27
8.2.20.0000.00718.04
8.2.10.0030.00618.05
8.2.00.0040.00418.07
8.1.280.0070.00725.92
8.1.270.0040.00422.11
8.1.260.0050.00226.35
8.1.250.0000.00728.09
8.1.240.0030.00622.21
8.1.230.0040.00719.61
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0040.00717.48
8.1.190.0040.00417.00
8.1.180.0040.00418.10
8.1.170.0000.00717.62
8.1.160.0030.00619.02
8.1.150.0070.00018.81
8.1.140.0000.00719.54
8.1.130.0030.00318.88
8.1.120.0000.00717.36
8.1.110.0020.00517.48
8.1.100.0040.00417.47
8.1.90.0040.00417.44
8.1.80.0030.00517.44
8.1.70.0000.00817.39
8.1.60.0050.00317.57
8.1.50.0040.00417.50
8.1.40.0000.00817.34
8.1.30.0030.00517.66
8.1.20.0000.00817.63
8.1.10.0040.00417.51
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0030.00318.44
8.0.270.0040.00417.17
8.0.260.0040.00419.01
8.0.250.0030.00316.93
8.0.240.0050.00317.00
8.0.230.0030.00316.84
8.0.220.0050.00316.84
8.0.210.0070.00016.85
8.0.200.0030.00316.84
8.0.190.0080.00016.87
8.0.180.0040.00416.90
8.0.170.0000.00816.95
8.0.160.0000.00716.80
8.0.150.0030.00316.83
8.0.140.0030.00716.86
8.0.130.0000.00513.28
8.0.120.0000.00916.75
8.0.110.0040.00416.77
8.0.100.0030.00516.71
8.0.90.0000.00716.77
8.0.80.0040.01116.83
8.0.70.0030.00617.00
8.0.60.0050.00216.87
8.0.50.0040.00416.70
8.0.30.0080.01117.08
8.0.20.0110.00917.40
8.0.10.0080.00016.90
8.0.00.0090.00916.71
7.4.330.0060.00015.55
7.4.320.0030.00316.40
7.4.300.0040.00416.51
7.4.290.0000.00716.49
7.4.280.0040.00416.59
7.4.270.0000.00716.52
7.4.260.0000.01016.58
7.4.250.0000.00716.46
7.4.240.0030.00316.52
7.4.230.0030.00516.71
7.4.220.0140.00316.57
7.4.210.0140.00316.61
7.4.200.0000.00716.60
7.4.160.0090.00816.48
7.4.150.0060.01217.40
7.4.140.0090.00917.86
7.4.130.0040.01516.55
7.4.120.0110.01116.61
7.4.110.0040.01216.59
7.4.100.0100.00716.37
7.4.90.0040.01216.49
7.4.80.0070.01019.39
7.4.70.0110.00516.43
7.4.60.0160.00316.45
7.4.50.0060.00916.57
7.4.40.0170.00716.70
7.4.30.0060.00916.32
7.4.00.0070.00715.06
7.3.330.0030.00313.32
7.3.320.0030.00313.23
7.3.310.0030.00316.21
7.3.300.0030.00316.32
7.3.290.0030.00316.31
7.3.280.0110.00616.30
7.3.270.0190.00017.40
7.3.260.0080.01116.56
7.3.250.0090.00916.38
7.3.240.0110.00916.41
7.3.230.0100.00716.60
7.3.210.0120.00616.41
7.3.200.0100.00716.43
7.3.190.0090.01216.18
7.3.180.0060.01016.58
7.3.170.0060.01216.18
7.3.160.0130.00616.28
7.2.330.0070.01016.91
7.2.320.0110.01116.50
7.2.310.0130.00716.53
7.2.300.0060.00916.62
7.2.290.0090.00916.55
7.2.110.0150.00316.50
7.2.60.0000.01317.11
7.1.200.0090.00315.78
7.1.70.0300.01415.28
7.1.60.0370.01633.35
7.1.50.0420.00933.09
7.1.40.0510.01232.52
7.1.30.0390.02432.59
7.1.20.0660.00832.82
7.1.10.0340.01014.63
7.1.00.0280.01614.82
7.0.200.0340.00915.01
7.0.190.0360.01114.86
7.0.180.0420.00314.44
7.0.170.0270.01614.44
7.0.160.0330.01014.52
7.0.150.0250.00614.40
7.0.140.0230.00714.33
7.0.130.0350.01014.58
7.0.120.0460.01014.57
7.0.110.0310.01214.59
7.0.100.0320.01314.66
7.0.90.0410.01514.57
7.0.80.0300.01014.71
7.0.70.0290.01314.28
7.0.60.0290.01214.13
7.0.50.0340.00714.62
7.0.40.0280.01314.64
7.0.30.0220.01814.80
7.0.20.0320.00414.44
7.0.10.0280.00714.55
7.0.00.0910.01614.44

preferences:
51.72 ms | 400 KiB | 5 Q