3v4l.org

run code in 300+ PHP versions simultaneously
<?php$input = 'coilovers[strut_and_individual_components][complete_strut][][achse]'); $output = array(); $pointer = $output;while( ($index = strpos( $input, '[')) !== false) { if( $index != 0) { $key = substr( $input, 0, $index); $pointer[$key] = array(); $pointer = $pointer[$key]; } $end_index = strpos( $input, ']'); $array_key = substr( $input, $index, $end_index); $pointer[$array_key] = array(); $pointer = $pointer[$array_key]; $input = substr( $input, $end_index); echo "$input\n";} <?php

This is an error 404

There are `0` results


preferences:
151.49 ms | 1403 KiB | 7 Q