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]; echo "<select name='n'>"; for($i=$a_explode[0];$i<=$a_explode[1];$i++){ //echo ++$a_explode[0]; echo "<option value=$i>$a_explode[1]<option>"; } echo "</select>"; // switch($matches[0]){ //case "-":for(); //} }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8OZ9X
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
   20     5      > RETURN                                                   1

Function showresult:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 19
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 19
Branch analysis from position: 30
Branch analysis from position: 19
filename:       /in/8OZ9X
function name:  showresult
number of ops:  32
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
   11    15        ECHO                                                     '%3Cselect+name%3D%27n%27%3E'
   12    16        FETCH_DIM_R                                      ~13     !4, 0
         17        ASSIGN                                                   !5, ~13
         18      > JMP                                                      ->27
   14    19    >   ROPE_INIT                                     5  ~17     '%3Coption+value%3D'
         20        ROPE_ADD                                      1  ~17     ~17, !5
         21        ROPE_ADD                                      2  ~17     ~17, '%3E'
         22        FETCH_DIM_R                                      ~15     !4, 1
         23        ROPE_ADD                                      3  ~17     ~17, ~15
         24        ROPE_END                                      4  ~16     ~17, '%3Coption%3E'
         25        ECHO                                                     ~16
   12    26        PRE_INC                                                  !5
         27    >   FETCH_DIM_R                                      ~21     !4, 1
         28        IS_SMALLER_OR_EQUAL                                      !5, ~21
         29      > JMPNZ                                                    ~22, ->19
   16    30    >   ECHO                                                     '%3C%2Fselect%3E'
   20    31      > RETURN                                                   null

End of function showresult

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.05 ms | 1405 KiB | 17 Q