3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Flextype { protected static $instance = null; public static function instance() { return !isset(self::$instance) and self::$instance = new Flextype(); } } var_export(Flextype::instance());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OfvQs
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'var_export'
          1        INIT_STATIC_METHOD_CALL                                  'Flextype', 'instance'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
          5      > RETURN                                                   1

Class Flextype:
Function instance:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/OfvQs
function name:  instance
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ISSET_ISEMPTY_STATIC_PROP                        ~0      'instance'
          1        BOOL_NOT                                         ~1      ~0
          2      > JMPZ_EX                                          ~1      ~1, ->8
          3    >   NEW                                              $3      'Flextype'
          4        DO_FCALL                                      0          
          5        ASSIGN_STATIC_PROP                               ~2      'instance'
          6        OP_DATA                                                  $3
          7        BOOL                                             ~1      ~2
          8    > > RETURN                                                   ~1
   10     9*     > RETURN                                                   null

End of function instance

End of class Flextype.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.85 ms | 1451 KiB | 14 Q