3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Random { if (!\class_exists(\Random\Randomizer::class)) { final class Randomizer { public function nextInt(): int { return 1; } } } } namespace { $randomizer = new \Random\Randomizer; \var_dump($randomizer->nextInt()); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/JludD
function name:  (null)
number of ops:  15
compiled vars:  !0 = $randomizer
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'class_exists'
          1        SEND_VAL                                                 'Random%5CRandomizer'
          2        DO_ICALL                                         $1      
          3        BOOL_NOT                                         ~2      $1
          4      > JMPZ                                                     ~2, ->6
    5     5    >   DECLARE_CLASS                                            'random%5Crandomizer'
   16     6    >   NEW                                              $3      'Random%5CRandomizer'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !0, $3
   17     9        INIT_FCALL                                               'var_dump'
         10        INIT_METHOD_CALL                                         !0, 'nextInt'
         11        DO_FCALL                                      0  $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
   18    14      > RETURN                                                   1

Class Random\Randomizer:
Function nextint:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JludD
function name:  nextInt
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > RETURN                                                   1
   10     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function nextint

End of class Random\Randomizer.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.42 ms | 1395 KiB | 17 Q