3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isEqual($value, &$a = null, &$b = null) { $a = rand(1,3); $b = rand(1,3); return $a == $b; } $force = true; for($i=0; $i<10; $i++) { if ($isEqual(null, $a, $b) || $force) { echo $i . PHP_EOL; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 3
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 47) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 3
Branch analysis from position: 16
Branch analysis from position: 3
Branch analysis from position: 13
Branch analysis from position: 10
filename:       /in/DtjR7
function name:  (null)
number of ops:  17
compiled vars:  !0 = $force, !1 = $i, !2 = $isEqual, !3 = $a, !4 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, <true>
   11     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->14
   12     3    >   INIT_DYNAMIC_CALL                                        !2
          4        SEND_VAL_EX                                              null
          5        SEND_VAR_EX                                              !3
          6        SEND_VAR_EX                                              !4
          7        DO_FCALL                                      0  $7      
          8      > JMPNZ_EX                                         ~8      $7, ->10
          9    >   BOOL                                             ~8      !0
         10    > > JMPZ                                                     ~8, ->13
   13    11    >   CONCAT                                           ~9      !1, '%0A'
         12        ECHO                                                     ~9
   11    13    >   PRE_INC                                                  !1
         14    >   IS_SMALLER                                               !1, 10
         15      > JMPNZ                                                    ~11, ->3
   15    16    > > RETURN                                                   1

Function isequal:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DtjR7
function name:  isEqual
number of ops:  16
compiled vars:  !0 = $value, !1 = $a, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
          2        RECV_INIT                                        !2      null
    4     3        INIT_FCALL                                               'rand'
          4        SEND_VAL                                                 1
          5        SEND_VAL                                                 3
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !1, $3
    5     8        INIT_FCALL                                               'rand'
          9        SEND_VAL                                                 1
         10        SEND_VAL                                                 3
         11        DO_ICALL                                         $5      
         12        ASSIGN                                                   !2, $5
    6    13        IS_EQUAL                                         ~7      !1, !2
         14      > RETURN                                                   ~7
    7    15*     > RETURN                                                   null

End of function isequal

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.81 ms | 1400 KiB | 15 Q