3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str["options"] = "Hello,Howdy,Hola"; $data = explode(",", $str["options"]); $newstr = 'My values are'. PHP_EOL; foreach($data as $key => $value){ $number = $key+1; $newstr .= "$number.". $value . PHP_EOL; } echo $newstr;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 20
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 20
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/lCYMk
function name:  (null)
number of ops:  23
compiled vars:  !0 = $str, !1 = $data, !2 = $newstr, !3 = $value, !4 = $key, !5 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN_DIM                                               !0, 'options'
          1        OP_DATA                                                  'Hello%2CHowdy%2CHola'
    3     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%2C'
          4        FETCH_DIM_R                                      ~7      !0, 'options'
          5        SEND_VAL                                                 ~7
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !1, $8
    5     8        ASSIGN                                                   !2, 'My+values+are%0A'
    6     9      > FE_RESET_R                                       $11     !1, ->20
         10    > > FE_FETCH_R                                       ~12     $11, !3, ->20
         11    >   ASSIGN                                                   !4, ~12
    7    12        ADD                                              ~14     !4, 1
         13        ASSIGN                                                   !5, ~14
    8    14        NOP                                                      
         15        FAST_CONCAT                                      ~16     !5, '.'
         16        CONCAT                                           ~17     ~16, !3
         17        CONCAT                                           ~18     ~17, '%0A'
         18        ASSIGN_OP                                     8          !2, ~18
    6    19      > JMP                                                      ->10
         20    >   FE_FREE                                                  $11
   10    21        ECHO                                                     !2
   11    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
279.76 ms | 1010 KiB | 14 Q