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 ); }

preferences:
25.68 ms | 404 KiB | 5 Q