3v4l.org

run code in 300+ PHP versions simultaneously
<?php $map = ' \\ / / / / / \\ \\ \\ / \\ /\\ \\/ \\ / \\ \\ \\ \\ \\ \\ / /'; echo r($map); function r($m){ //$x=1;$p=0; echo strrpos(substr($m,0,strpos($m,"/\\")),"\n"); // foreach(explode("\n",$m) as $l){ // // echo $x.")".$l."\n";$x++; // if($p=strpos($l,"/\\")){$p++;break;} // }echo $p; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4j49g
function name:  (null)
number of ops:  6
compiled vars:  !0 = $map
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '++++++++++++++++++%5C%0A++++++%2F++++++++++%2F%0A+++++++%2F++++++++%2F%0A++++++++%2F++++++%5C%0A+++++++++%5C++++%5C%0A++++++++++%2F++%5C%0A+++++++++++%2F%5C%0A+++++++++++%5C%2F%0A++++++++++%5C++%2F%0A+++++++++%5C++++%5C%0A++++++++%5C++++++%5C%0A+++++++%5C++++++++%5C%0A++++++%2F++++++++++%2F'
   15     1        INIT_FCALL_BY_NAME                                       'r'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
   24     5      > RETURN                                                   1

Function r:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4j49g
function name:  r
number of ops:  16
compiled vars:  !0 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   19     1        INIT_FCALL                                               'strrpos'
          2        INIT_FCALL                                               'substr'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 0
          5        INIT_FCALL                                               'strpos'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 '%2F%5C'
          8        DO_ICALL                                         $1      
          9        SEND_VAR                                                 $1
         10        DO_ICALL                                         $2      
         11        SEND_VAR                                                 $2
         12        SEND_VAL                                                 '%0A'
         13        DO_ICALL                                         $3      
         14        ECHO                                                     $3
   24    15      > RETURN                                                   null

End of function r

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.05 ms | 1395 KiB | 19 Q