3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_array = array ( 'text' => '', 'attachments' => array ( 0 => array ( 'type' => 'video', 'video' => array ( 'duration' => 35, 'image' => array ( 0 => array ( 'height' => 96, 'url' => 'image1.jpg', 'width' => 130, 'with_padding' => 1, ), 1 => array ( 'height' => 120, 'url' => 'image2.jpg', 'width' => 160, 'with_padding' => 1, ), ), 'first_frame' => array ( 0 => array ( 'height' => 569, 'url' => 'image1.2.jpg', 'width' => 320, ), 1 => array ( 'height' => 284, 'url' => 'image2.2.jpg', 'width' => 160, ), ), 'width' => 720, 'height' => 1280, ), ), ), ); function recursive_my_array( $array ) { foreach ( $array as $key => $value ) { if ( ! is_array( $value ) ) continue; if ( ! array_key_exists( "width", $value ) ) continue; print "\n" . $value["url"]; } if ( is_array( $value ) ) { recursive_my_array( $value ); } }
Output for git.master, git.master_jit, rfc.property-hooks

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
62.36 ms | 401 KiB | 8 Q