3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Brands { public function create_brand_table(): void { echo __FUNCTION__, PHP_EOL; } public function delete_brand_table(): void { echo __FUNCTION__, PHP_EOL; } } class TablesManager { private $brands; public function __construct(Brands $brands) { $this->brands = $brands; } public function create_tables(): void { $this->brands->create_brand_table(); } public function delete_tables(): void { $this->brands->delete_brand_table(); } } $brands = new Brands(); $tables_manager = new TablesManager($brands); $tables_manager->create_tables(); $tables_manager->delete_tables();

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.4.140.0060.01417.83
8.4.130.0100.01018.60
8.4.120.0110.00918.71
8.4.110.0120.00520.45
8.4.100.0120.00817.73
8.4.90.0050.00522.35
8.4.80.0030.00520.71
8.4.70.0110.00717.71
8.4.60.0070.00920.47
8.4.50.0070.00220.36
8.4.40.0140.00619.46
8.4.30.0060.00920.54
8.4.20.0060.00317.88
8.4.10.0200.00019.39
8.3.270.0110.00916.57
8.3.260.0120.00816.70
8.3.250.0140.00616.63
8.3.240.0060.00216.35
8.3.230.0060.01316.65
8.3.220.0130.00620.80
8.3.210.0110.00416.63
8.3.200.0130.00716.42
8.3.190.0130.00618.38
8.3.180.0140.00616.43
8.3.170.0150.00416.41
8.3.160.0070.01117.18
8.3.150.0080.00817.08
8.3.140.0090.00920.71
8.3.130.0050.00318.37
8.3.120.0100.00019.09
8.3.110.0050.00320.94
8.3.100.0070.00018.37
8.3.90.0040.00426.77
8.3.80.0090.00019.36
8.3.70.0060.00916.63
8.3.60.0080.00816.63
8.3.50.0080.00924.57
8.3.40.0150.00018.73
8.3.30.0040.01118.46
8.3.20.0040.00420.85
8.3.10.0150.00021.82
8.3.00.0080.00023.58
8.2.290.0140.00516.91
8.2.280.0080.01022.23
8.2.270.0110.00718.34
8.2.260.0040.01416.73
8.2.250.0060.00916.68
8.2.240.0160.00017.37
8.2.230.0040.00422.58
8.2.220.0060.00324.06
8.2.210.0080.00026.77
8.2.200.0000.00818.88
8.2.190.0120.00616.75
8.2.180.0100.01016.61
8.2.170.0070.00722.96
8.2.160.0130.00322.11
8.2.150.0030.00524.18
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0080.00026.16
8.2.110.0030.00720.39
8.2.100.0040.00817.90
8.2.90.0080.00019.23
8.2.80.0000.00817.97
8.2.70.0000.00817.63
8.2.60.0050.00317.80
8.2.50.0040.00418.10
8.2.40.0000.00819.88
8.2.30.0060.00318.08
8.2.20.0000.00717.88
8.2.10.0000.00819.25
8.2.00.0000.00719.19
8.1.330.0130.00616.09
8.1.320.0160.00416.28
8.1.310.0000.00816.77
8.1.300.0130.00617.96
8.1.290.0030.00730.84
8.1.280.0090.00625.92
8.1.270.0000.00822.52
8.1.260.0040.00426.35
8.1.250.0090.00028.09
8.1.240.0040.00419.21
8.1.230.0070.00317.83
8.1.220.0000.00717.74
8.1.210.0000.00918.77
8.1.200.0000.01117.35
8.1.190.0060.00317.36
8.1.180.0080.00018.10
8.1.170.0000.00818.50
8.1.160.0000.00718.89
8.1.150.0000.00719.03
8.1.140.0000.00720.71
8.1.130.0000.00720.07
8.1.120.0040.00417.42
8.1.110.0040.00417.37
8.1.100.0000.00717.36
8.1.90.0040.00417.35
8.1.80.0040.00417.41
8.1.70.0030.00317.35
8.1.60.0000.00817.55
8.1.50.0030.00517.55
8.1.40.0000.00817.42
8.1.30.0000.00817.53
8.1.20.0050.00317.66
8.1.10.0000.00817.50
8.1.00.0060.00317.53
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00818.44
8.0.270.0030.00318.12
8.0.260.0070.00020.07
8.0.250.0070.00016.88
8.0.240.0000.01016.98
8.0.230.0000.00816.85
8.0.220.0070.00016.89
8.0.210.0060.00316.95
8.0.200.0020.00516.93
8.0.190.0000.00716.85
8.0.180.0000.00816.98
8.0.170.0050.00316.97
8.0.160.0040.00416.89
8.0.150.0030.00316.80
8.0.140.0030.00616.74
8.0.130.0000.00513.20
8.0.120.0040.00416.85
8.0.110.0000.00716.79
8.0.100.0040.00416.89
8.0.90.0000.00916.81
8.0.80.0070.00916.89
8.0.70.0000.00716.79
8.0.60.0000.00716.85
8.0.50.0040.00416.86
8.0.30.0100.00717.04
8.0.20.0060.01217.18
8.0.10.0040.00416.95
8.0.00.0100.00716.75
7.4.330.0050.00016.84
7.4.320.0030.00316.44
7.4.300.0040.00416.63
7.4.290.0000.00816.51
7.4.280.0020.00516.55
7.4.270.0000.00716.41
7.4.260.0030.00313.29
7.4.250.0040.00416.40
7.4.240.0070.00016.60
7.4.230.0030.00316.59
7.4.220.0050.00216.54
7.4.210.0100.00616.59
7.4.200.0030.00316.70
7.4.130.0090.00916.55
7.4.120.0150.00616.56
7.4.110.0070.01016.46
7.4.100.0130.00316.42
7.4.90.0110.00616.52
7.4.80.0070.01419.39
7.4.70.0100.00716.50
7.4.60.0120.00616.37
7.4.50.0130.00316.58
7.4.40.0160.00316.60
7.4.10.0060.00914.77
7.4.00.0080.01114.69
7.3.330.0050.00316.21
7.3.320.0050.00013.19
7.3.310.0080.00016.27
7.3.300.0030.00316.28
7.3.290.0130.00616.23
7.3.260.0130.00616.38
7.3.240.0090.00816.34
7.3.230.0160.00416.50
7.3.210.0030.01416.54
7.3.200.0070.01416.31
7.3.190.0070.01016.54
7.3.180.0070.01016.45
7.3.170.0070.01316.19
7.3.160.0060.01016.50
7.3.130.0060.01114.50
7.3.120.0020.01514.82
7.3.110.0120.00414.46
7.3.100.0030.01414.68
7.3.90.0080.01214.50
7.3.80.0080.01114.63
7.3.70.0140.00314.50
7.3.60.0040.01614.51
7.3.50.0050.00914.62
7.3.40.0070.01014.29
7.3.30.0090.00514.55
7.3.20.0080.00814.55
7.3.10.0070.00714.73
7.3.00.0090.00614.50
7.2.330.0080.00816.82
7.2.320.0070.01016.77
7.2.310.0080.00816.76
7.2.300.0080.00916.68
7.2.290.0110.00516.82
7.2.260.0090.00614.74
7.2.250.0030.01414.54
7.2.240.0090.00914.86
7.2.230.0110.01114.84
7.2.220.0060.01514.66
7.2.210.0110.00814.84
7.2.200.0060.00914.76
7.2.190.0100.01015.06
7.2.180.0090.00515.02
7.2.170.0070.01015.03
7.2.160.0100.00514.81
7.2.150.0150.00414.83
7.2.140.0110.00614.71
7.2.130.0130.00315.14
7.2.120.0000.01414.86
7.2.110.0080.01215.27
7.2.100.0060.01214.91
7.2.90.0160.00615.05
7.2.80.0180.00414.84
7.2.70.0060.01514.86
7.2.60.0100.00614.96
7.2.50.0100.00615.18
7.2.40.0050.01115.00
7.2.30.0110.00415.02
7.2.20.0150.00414.97
7.2.10.0080.00815.00
7.2.00.0060.00915.06

preferences:
80.83 ms | 403 KiB | 5 Q