3v4l.org

run code in 300+ PHP versions simultaneously
<?php define("Hi", "Hello"); echo Hi; $cars = array("BMW", "Ferrai", "Audi"); echo $count(cars); foreach($cars as $value) { echo "$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 = 13, Position 2 = 18
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/PGH3B
function name:  (null)
number of ops:  29
compiled vars:  !0 = $cars, !1 = $count, !2 = $value
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        INIT_DYNAMIC_CALL                                        !1
          8        FETCH_CONSTANT                                   ~6      'cars'
          9        SEND_VAL_EX                                              ~6
         10        DO_FCALL                                      0  $7      
         11        ECHO                                                     $7
    7    12      > FE_RESET_R                                       $8      !0, ->18
         13    > > FE_FETCH_R                                               $8, !2, ->18
    9    14    >   NOP                                                      
         15        FAST_CONCAT                                      ~9      !2, '+%3Cbr%3E'
         16        ECHO                                                     ~9
    7    17      > JMP                                                      ->13
         18    >   FE_FREE                                                  $8
   18    19        INIT_FCALL                                               'add'
         20        SEND_VAL                                                 4
         21        SEND_VAL                                                 3
         22        DO_FCALL                                      0  $10     
         23        CONCAT                                           ~11     '4+%2B+3', $10
         24        ECHO                                                     ~11
   19    25        INIT_FCALL                                               'add'
         26        DO_FCALL                                      0  $12     
         27        ECHO                                                     $12
   20    28      > RETURN                                                   1

Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PGH3B
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:
159.79 ms | 1398 KiB | 17 Q