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 );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gRUbv
function name:  (null)
number of ops:  24
compiled vars:  !0 = $src, !1 = $efs_contents, !2 = $efs_params, !3 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'EFS_IFRAME'
          2        SEND_VAL                                                 1
          3        DO_ICALL                                                 
          4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 'EFS_URI'
          6        SEND_VAL                                                 2
          7        DO_ICALL                                                 
          8        ASSIGN                                                   !0, 'https%3A%2F%2Fw.soundcloud.com%2Fplayer%2F%3Furl%3Dhttps%253A%2F%2Fapi.soundcloud.com%2Ftracks%2F156742959%26color%3Dff5500%26auto_play%3Dfalse%26hide_related%3Dfalse%26show_comments%3Dtrue%26show_user%3Dtrue%26show_reposts%3Dfalse'
    4     9        FETCH_CONSTANT                                   ~7      'EFS_IFRAME'
         10        INIT_ARRAY                                       ~8      <array>, ~7
         11        ASSIGN                                                   !1, ~8
    5    12        FETCH_CONSTANT                                   ~10     'EFS_IFRAME'
         13        INIT_ARRAY                                       ~11     <array>, ~10
         14        FETCH_CONSTANT                                   ~12     'EFS_URI'
         15        ADD_ARRAY_ELEMENT                                ~11     <array>, ~12
         16        ASSIGN                                                   !2, ~11
   17    17        INIT_FCALL                                               'efs_param_decode'
         18        SEND_VAR                                                 !0
         19        FETCH_CONSTANT                                   ~14     'EFS_URI'
         20        SEND_VAL                                                 ~14
         21        DO_FCALL                                      0  $15     
         22        ASSIGN                                                   !3, $15
         23      > RETURN                                                   1

Function efs_param_decode:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 21
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 21
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 20
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/gRUbv
function name:  efs_param_decode
number of ops:  24
compiled vars:  !0 = $str, !1 = $context, !2 = $efs_params, !3 = $getparams, !4 = $params, !5 = $regex, !6 = $key, !7 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <const ast>
    8     2        BIND_GLOBAL                                              !2, 'efs_params'
    9     3        FETCH_DIM_R                                      ~8      !2, !1
          4        ASSIGN                                                   !3, ~8
   10     5        ASSIGN                                                   !4, <array>
   11     6      > FE_RESET_R                                       $11     !3, ->21
          7    > > FE_FETCH_R                                       ~12     $11, !5, ->21
          8    >   ASSIGN                                                   !6, ~12
   12     9        INIT_FCALL                                               'preg_match'
         10        SEND_VAR                                                 !5
         11        SEND_VAR                                                 !0
         12        SEND_REF                                                 !7
         13        DO_ICALL                                         $14     
         14      > JMPZ                                                     $14, ->20
         15    >   INIT_FCALL                                               'end'
         16        SEND_REF                                                 !7
         17        DO_ICALL                                         $16     
         18        ASSIGN_DIM                                               !4, !6
         19        OP_DATA                                                  $16
   11    20    > > JMP                                                      ->7
         21    >   FE_FREE                                                  $11
   13    22      > RETURN                                                   !4
   14    23*     > RETURN                                                   null

End of function efs_param_decode

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.82 ms | 1394 KiB | 20 Q