3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('EFS_IFRAME', 1);define('EFS_URI', 2);$src = 'https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/156742959&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false'; $efs_contents = array( EFS_IFRAME => array('regex' => '#(?:<(div|span)[^>]*>[\s]*)*<iframe[\s]*([^>]+)>[\s]*<\/iframe[^>]*>(?:[\s]*<embed[^>]*>[^<]*<\/embed[^>]*>[\s]*)*(?:<\/(?:div|span)[^>]*>)*#iu', 'callback' => 'efs_iframe_callback' ) ); $efs_params = array( EFS_IFRAME => array( 'src' => '#src[\s]*=[\s]*[\'"]([^\'"]*)[\'"]#i', 'width' => '#width[\s]*=[\s]*[\'"]([^\'"]*)[\'"]#i', 'height' => '#height[\s]*=[\s]*[\'"]([^\'"]*)[\'"]#i', 'title' => '#title[\s]*=[\s]*[\'"]([^\'"]*)[\'"]#i', 'scrolling' => '#scrolling[\s]*=[\s]*[\'"]([^\'"]*)[\'"]#i', 'frameborder' => '#frameborder[\s]*=[\s]*[\'"]([^\'"]*)[\'"]#i' /* 'allowfullscreen' => '#allowfullscreen#i' */ ), EFS_URI => array( 'url' => 'url=([^&]*)', 'color' => 'color=([^&]*)', 'autoplay' => 'autoplay=([^&]*)', 'hide_related' => 'hide_related=([^&]*)', 'show_comments' => 'show_comments=([^&]*)', 'show_user' => 'show_user=([^&]*)', 'show_reposts' => 'show_reposts=([^&]*)' ) ); function efs_param_decode( $str, $context=EFS_IFRAME ) { global $efs_params; $getparams = $efs_params[$context]; $params = array(); foreach ($getparams as $key => $regex) { if(preg_match($regex, $str, $output)) $params[$key] = end($output); } return $params; } $v = efs_param_decode( $src, EFS_URI );
Output for 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /in/06aKe on line 10 Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /in/06aKe on line 10 Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /in/06aKe on line 10 Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /in/06aKe on line 10 Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /in/06aKe on line 10 Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /in/06aKe on line 10 Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /in/06aKe on line 10
Output for 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28
Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /in/06aKe on line 10 Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /in/06aKe on line 10 Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /in/06aKe on line 10 Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /in/06aKe on line 10 Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /in/06aKe on line 10 Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /in/06aKe on line 10 Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /in/06aKe on line 10
Output for 4.3.0 - 4.3.10
Warning: Delimiter must not be alphanumeric or backslash in /in/06aKe on line 10 Warning: Delimiter must not be alphanumeric or backslash in /in/06aKe on line 10 Warning: Delimiter must not be alphanumeric or backslash in /in/06aKe on line 10 Warning: Delimiter must not be alphanumeric or backslash in /in/06aKe on line 10 Warning: Delimiter must not be alphanumeric or backslash in /in/06aKe on line 10 Warning: Delimiter must not be alphanumeric or backslash in /in/06aKe on line 10 Warning: Delimiter must not be alphanumeric or backslash in /in/06aKe on line 10

preferences:
201.04 ms | 402 KiB | 352 Q