3v4l.org

run code in 300+ PHP versions simultaneously
<?php function A($x) { if ($x > 5) return $x === 5; return 5; } function B($x) { return A($x / A($x - 5)); } $x = B(5) + B(5 + 5); echo (A(5) === 5 ? $x * 5 : $x + 5) / 5 - 5; echo "\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LmbUt
function name:  (null)
number of ops:  23
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'b'
          1        SEND_VAL                                                 5
          2        DO_FCALL                                      0  $1      
          3        INIT_FCALL                                               'b'
          4        SEND_VAL                                                 10
          5        DO_FCALL                                      0  $2      
          6        ADD                                              ~3      $1, $2
          7        ASSIGN                                                   !0, ~3
   14     8        INIT_FCALL                                               'a'
          9        SEND_VAL                                                 5
         10        DO_FCALL                                      0  $5      
         11        IS_IDENTICAL                                             $5, 5
         12      > JMPZ                                                     ~6, ->16
         13    >   MUL                                              ~7      !0, 5
         14        QM_ASSIGN                                        ~8      ~7
         15      > JMP                                                      ->18
         16    >   ADD                                              ~9      !0, 5
         17        QM_ASSIGN                                        ~8      ~9
         18    >   DIV                                              ~10     ~8, 5
         19        SUB                                              ~11     ~10, 5
         20        ECHO                                                     ~11
   15    21        ECHO                                                     '%0A'
         22      > RETURN                                                   1

Function a:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LmbUt
function name:  A
number of ops:  7
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        IS_SMALLER                                               5, !0
          2      > JMPZ                                                     ~1, ->5
    5     3    >   IS_IDENTICAL                                     ~2      !0, 5
          4      > RETURN                                                   ~2
    6     5    > > RETURN                                                   5
    7     6*     > RETURN                                                   null

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LmbUt
function name:  B
number of ops:  11
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        INIT_FCALL                                               'a'
          2        INIT_FCALL                                               'a'
          3        SUB                                              ~1      !0, 5
          4        SEND_VAL                                                 ~1
          5        DO_FCALL                                      0  $2      
          6        DIV                                              ~3      !0, $2
          7        SEND_VAL                                                 ~3
          8        DO_FCALL                                      0  $4      
          9      > RETURN                                                   $4
   11    10*     > RETURN                                                   null

End of function b

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.73 ms | 1403 KiB | 18 Q