3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($n) { $r = $n-$n; $b = ($r===0)?true:false; return $r; } $b = test('a12'); echo $b;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MLQ4G
function name:  (null)
number of ops:  6
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'test'
          1        SEND_VAL                                                 'a12'
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
   10     4        ECHO                                                     !0
          5      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MLQ4G
function name:  test
number of ops:  11
compiled vars:  !0 = $n, !1 = $r, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        SUB                                              ~3      !0, !0
          2        ASSIGN                                                   !1, ~3
    6     3        IS_IDENTICAL                                             !1, 0
          4      > JMPZ                                                     ~5, ->7
          5    >   QM_ASSIGN                                        ~6      <true>
          6      > JMP                                                      ->8
          7    >   QM_ASSIGN                                        ~6      <false>
          8    >   ASSIGN                                                   !2, ~6
    7     9      > RETURN                                                   !1
    8    10*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.73 ms | 1397 KiB | 14 Q