3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* $x = TRUE; <- TRUE; $x = FALSE; <- FALSE; $x = TRUE; */ function x($x){ return (!$x = !$x ? TRUE : FALSE); } var_dump(TRUE); var_dump(FALSE);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6J6nr
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                                 
   15     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAL                                                 <false>
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function x:
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 = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6J6nr
function name:  x
number of ops:  10
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        BOOL_NOT                                         ~1      !0
          2      > JMPZ                                                     ~1, ->5
          3    >   QM_ASSIGN                                        ~2      <true>
          4      > JMP                                                      ->6
          5    >   QM_ASSIGN                                        ~2      <false>
          6    >   ASSIGN                                           ~3      !0, ~2
          7        BOOL_NOT                                         ~4      ~3
          8      > RETURN                                                   ~4
   11     9*     > RETURN                                                   null

End of function x

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.76 ms | 1399 KiB | 15 Q