3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Foo { public static function Flip() { return (bool) mt_rand(0, 1); } } $bar = Foo::Flip(); var_dump($bar);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UXdYv
function name:  (null)
number of ops:  7
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_STATIC_METHOD_CALL                                  'Foo', 'Flip'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   11     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Class Foo:
Function flip:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UXdYv
function name:  Flip
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'mt_rand'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 1
          3        DO_ICALL                                         $0      
          4        BOOL                                             ~1      $0
          5      > RETURN                                                   ~1
    7     6*     > RETURN                                                   null

End of function flip

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.8 ms | 1398 KiB | 17 Q