3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arraydata = [ "thumbnail" => [ "width" => 150, "height" => 150, "crop" => 1 ], "medium" => [ "width" => 300, "height" => 300, "crop" => '' ], "medium_large" => [ "width" => 1024, "height" => 1024, "crop" => '' ], "large" => [ "width" => 2000, "height" => 1200, "crop" => 1 ], "twentyseventeen-thumbnail-avatar" => [ "width" => 2000, "height" => 1200, "crop" => 1 ], "twentyseventeen-thumbnail-avatar" => [ "width" => 100, "height" => 100, "crop" => 1 ] ]; foreach($arraydata as $key => $value) { echo "key: $key width: ${value['width']} height: ${value['height']}\n"; echo "key: " . $key . " width: " . $value['width'] . " height: " . $value['height'] . "\n"; }
Output for 8.2.0 - 8.2.29, 8.3.0 - 8.3.26, 8.4.1 - 8.4.13
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /in/gkcXi on line 38 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /in/gkcXi on line 38 key: thumbnail width: 150 height: 150 key: thumbnail width: 150 height: 150 key: medium width: 300 height: 300 key: medium width: 300 height: 300 key: medium_large width: 1024 height: 1024 key: medium_large width: 1024 height: 1024 key: large width: 2000 height: 1200 key: large width: 2000 height: 1200 key: twentyseventeen-thumbnail-avatar width: 100 height: 100 key: twentyseventeen-thumbnail-avatar width: 100 height: 100
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33
key: thumbnail width: 150 height: 150 key: thumbnail width: 150 height: 150 key: medium width: 300 height: 300 key: medium width: 300 height: 300 key: medium_large width: 1024 height: 1024 key: medium_large width: 1024 height: 1024 key: large width: 2000 height: 1200 key: large width: 2000 height: 1200 key: twentyseventeen-thumbnail-avatar width: 100 height: 100 key: twentyseventeen-thumbnail-avatar width: 100 height: 100

preferences:
133.44 ms | 410 KiB | 5 Q