3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array=array('A-C','A-E','Yes or No'); $result=array_map("showresult",$array); function showresult($a){ $case=preg_match_all('/-|or/',$a,$matches); $a_explode=explode("-",$a); print_r($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/nB13v
function name:  (null)
number of ops:  7
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                                               'array_map'
          2        SEND_VAL                                                 'showresult'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
   11     6      > RETURN                                                   1

Function showresult:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nB13v
function name:  showresult
number of ops:  17
compiled vars:  !0 = $a, !1 = $case, !2 = $matches, !3 = $a_explode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F-%7Cor%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !2
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
    6     7        INIT_FCALL                                               'explode'
          8        SEND_VAL                                                 '-'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $6      
         11        ASSIGN                                                   !3, $6
    7    12        INIT_FCALL                                               'print_r'
         13        FETCH_DIM_R                                      ~8      !3, 0
         14        SEND_VAL                                                 ~8
         15        DO_ICALL                                                 
   11    16      > RETURN                                                   null

End of function showresult

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.78 ms | 1387 KiB | 21 Q