3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array=array('A-C','A-E','Yes or No'); $result=showresult('A-C'); //$result=array_map("showresult",$array); function showresult($a){ $case=preg_match_all('/-|or/',$a,$matches); $explode_by=$matches[0][0]; //print_r($matches[0][0]);die(); $a_explode=explode($explode_by,$a); echo $a_explode[0]; for($i=$a_explode[0];$i<=$a_explode[1];$i++){ echo ++$a_explode[0]; } // switch($matches[0]){ //case "-":for(); //} }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uCOlg
function name:  (null)
number of ops:  6
compiled vars:  !0 = $array, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL_BY_NAME                                       'showresult'
          2        SEND_VAL_EX                                              'A-C'
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !1, $3
   17     5      > RETURN                                                   1

Function showresult:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 20
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 20
Branch analysis from position: 27
Branch analysis from position: 20
filename:       /in/uCOlg
function name:  showresult
number of ops:  28
compiled vars:  !0 = $a, !1 = $case, !2 = $matches, !3 = $explode_by, !4 = $a_explode, !5 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F-%7Cor%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !2
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !1, $6
    7     7        FETCH_DIM_R                                      ~8      !2, 0
          8        FETCH_DIM_R                                      ~9      ~8, 0
          9        ASSIGN                                                   !3, ~9
    9    10        INIT_FCALL                                               'explode'
         11        SEND_VAR                                                 !3
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $11     
         14        ASSIGN                                                   !4, $11
   10    15        FETCH_DIM_R                                      ~13     !4, 0
         16        ECHO                                                     ~13
   11    17        FETCH_DIM_R                                      ~14     !4, 0
         18        ASSIGN                                                   !5, ~14
         19      > JMP                                                      ->24
   12    20    >   FETCH_DIM_RW                                     $16     !4, 0
         21        PRE_INC                                          ~17     $16
         22        ECHO                                                     ~17
   11    23        PRE_INC                                                  !5
         24    >   FETCH_DIM_R                                      ~19     !4, 1
         25        IS_SMALLER_OR_EQUAL                                      !5, ~19
         26      > JMPNZ                                                    ~20, ->20
   17    27    > > RETURN                                                   null

End of function showresult

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.16 ms | 1396 KiB | 17 Q