3v4l.org

run code in 300+ PHP versions simultaneously
<?php define("Hi", "Hello"); echo Hi; $cars = array("car1"=>"BMW", "car2"=>"Ferrai", "car3"=>"Audi"); echo $cars[car1]; foreach($cars as $x=>$value) { echo "$x $value <br>"; } function add($x = 10 , $y = 15) { $z = $x+$y; return $z; } echo "4 + 3".add(4,3); echo add(); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 19
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 19
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/WZ7jC
function name:  (null)
number of ops:  30
compiled vars:  !0 = $cars, !1 = $value, !2 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'Hi'
          2        SEND_VAL                                                 'Hello'
          3        DO_ICALL                                                 
    3     4        FETCH_CONSTANT                                   ~4      'Hi'
          5        ECHO                                                     ~4
    5     6        ASSIGN                                                   !0, <array>
    6     7        FETCH_CONSTANT                                   ~6      'car1'
          8        FETCH_DIM_R                                      ~7      !0, ~6
          9        ECHO                                                     ~7
    7    10      > FE_RESET_R                                       $8      !0, ->19
         11    > > FE_FETCH_R                                       ~9      $8, !1, ->19
         12    >   ASSIGN                                                   !2, ~9
    9    13        ROPE_INIT                                     4  ~12     !2
         14        ROPE_ADD                                      1  ~12     ~12, '+'
         15        ROPE_ADD                                      2  ~12     ~12, !1
         16        ROPE_END                                      3  ~11     ~12, '+%3Cbr%3E'
         17        ECHO                                                     ~11
    7    18      > JMP                                                      ->11
         19    >   FE_FREE                                                  $8
   18    20        INIT_FCALL                                               'add'
         21        SEND_VAL                                                 4
         22        SEND_VAL                                                 3
         23        DO_FCALL                                      0  $14     
         24        CONCAT                                           ~15     '4+%2B+3', $14
         25        ECHO                                                     ~15
   19    26        INIT_FCALL                                               'add'
         27        DO_FCALL                                      0  $16     
         28        ECHO                                                     $16
   20    29      > RETURN                                                   1

Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WZ7jC
function name:  add
number of ops:  6
compiled vars:  !0 = $x, !1 = $y, !2 = $z
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV_INIT                                        !0      10
          1        RECV_INIT                                        !1      15
   14     2        ADD                                              ~3      !0, !1
          3        ASSIGN                                                   !2, ~3
   15     4      > RETURN                                                   !2
   16     5*     > RETURN                                                   null

End of function add

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.67 ms | 1403 KiB | 17 Q