3v4l.org

run code in 300+ PHP versions simultaneously
<?php $product = []; for ($k = 0; $k <= 100; $k++) { $options = []; for ($j = 0; $j <= 10; $j++) { $optionItems = []; for ($i = 0; $i <= 100; $i++) { $optionItems[] = array( 'title' => 'OptionItem' . $i, 'description' => 'OptionItem ' . $i . ' Description', 'price' => random_int(1000, 10000) ); } $options[] = array( 'title' => 'Option' . $j, 'description' => 'Option ' . $j . ' Description', 'price' => random_int(1000, 10000), 'items' => $optionItems ); } $product[] = array( 'title' => 'Product' . $k, 'description' => 'Product ' . $k . ' Description', 'price' => random_int(1000, 10000), 'currency' => 'USD', 'category' => 'Category' . $k, 'brand' => 'Brand' . $k, 'options' => $options ); }

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.110.1180.04671.74
8.4.100.0870.03771.99
8.4.90.0890.03171.58
8.4.80.0960.03171.85
8.4.70.1020.02871.54
8.4.60.0900.02871.68
8.4.50.0850.03171.30
8.4.40.0790.03171.63
8.4.30.0920.02771.36
8.4.20.0890.03871.50
8.4.10.1240.03871.51
8.3.240.0940.04270.27
8.3.230.1000.03970.72
8.3.220.1020.02570.68
8.3.210.0980.02870.39
8.3.200.1030.03870.52
8.3.190.0850.03070.59
8.3.180.0810.02970.45
8.3.170.0770.03270.42
8.3.160.0910.03370.41
8.3.150.0920.03070.77
8.3.140.1020.03470.56
8.3.130.1090.02370.61
8.3.120.0890.03970.36
8.3.110.1050.02770.60
8.3.100.0980.03470.46
8.3.90.1030.02670.48
8.3.80.1050.02570.49
8.3.70.0950.02870.37
8.3.60.0920.03170.35
8.3.50.0970.03370.44
8.3.40.0660.02047.12
8.3.30.0620.02447.17
8.3.20.0670.02447.13
8.3.10.0730.02247.23
8.3.00.0640.01747.14
8.2.290.0860.02970.81
8.2.280.0710.03370.77
8.2.270.0760.03170.60
8.2.260.0950.02770.79
8.2.250.0860.03570.82
8.2.240.0980.02770.49
8.2.230.1000.02370.57
8.2.220.1000.04370.46
8.2.210.1100.02570.42
8.2.200.0980.02770.51
8.2.190.1020.02370.63
8.2.180.0880.03270.50
8.2.170.0680.02347.28
8.2.160.0530.02247.12
8.2.150.0780.01847.21
8.2.140.0570.01846.97
8.2.130.0500.02147.06
8.2.120.0580.01647.14
8.2.110.0600.01647.11
8.2.100.0690.01947.05
8.2.90.0600.02347.11
8.2.80.0670.01846.99
8.2.70.0600.01546.99
8.2.60.0670.02246.90
8.2.50.0540.03446.96
8.2.40.0620.01847.18
8.2.30.0670.02546.85
8.2.20.0640.01446.90
8.2.10.0620.01446.84
8.2.00.0720.02446.95

preferences:
40.11 ms | 403 KiB | 5 Q