3v4l.org

run code in 300+ PHP versions simultaneously
<?php function leSerialize() { for ($i = 0; $i < 1000; $i++) unserialize('O:8:"stdClass":0:{}'); } function leNew() { for ($i = 0; $i < 1000; $i++) new stdClass(); } function leClone() { $a = new stdClass(); for ($i = 0; $i < 1000; $i++) clone $a; } function leJson() { $json = '{}'; for ($i = 0; $i < 1000; $i++) json_decode($json); } function leReflection() { $class = new ReflectionClass('stdClass'); for ($i = 0; $i < 1000; $i++) $class->newInstance(); } leSerialize(); leNew(); leClone(); leJson(); leReflection();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k5KfJ
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E >   INIT_FCALL                                               'leserialize'
          1        DO_FCALL                                      0          
   41     2        INIT_FCALL                                               'lenew'
          3        DO_FCALL                                      0          
   43     4        INIT_FCALL                                               'leclone'
          5        DO_FCALL                                      0          
   45     6        INIT_FCALL                                               'lejson'
          7        DO_FCALL                                      0          
   47     8        INIT_FCALL                                               'lereflection'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Function leserialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 2
Branch analysis from position: 8
Branch analysis from position: 2
filename:       /in/k5KfJ
function name:  leSerialize
number of ops:  9
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->6
    6     2    >   INIT_FCALL                                               'unserialize'
          3        SEND_VAL                                                 'O%3A8%3A%22stdClass%22%3A0%3A%7B%7D'
          4        DO_ICALL                                                 
    5     5        PRE_INC                                                  !0
          6    >   IS_SMALLER                                               !0, 1000
          7      > JMPNZ                                                    ~4, ->2
    7     8    > > RETURN                                                   null

End of function leserialize

Function lenew:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 2
Branch analysis from position: 8
Branch analysis from position: 2
filename:       /in/k5KfJ
function name:  leNew
number of ops:  9
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->6
   12     2    >   NEW                                              $2      'stdClass'
          3        DO_FCALL                                      0          
          4        FREE                                                     $2
   11     5        PRE_INC                                                  !0
          6    >   IS_SMALLER                                               !0, 1000
          7      > JMPNZ                                                    ~5, ->2
   13     8    > > RETURN                                                   null

End of function lenew

Function leclone:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 5
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 5
Branch analysis from position: 10
Branch analysis from position: 5
filename:       /in/k5KfJ
function name:  leClone
number of ops:  11
compiled vars:  !0 = $a, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $2      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   19     3        ASSIGN                                                   !1, 0
          4      > JMP                                                      ->8
   20     5    >   CLONE                                            ~6      !0
          6        FREE                                                     ~6
   19     7        PRE_INC                                                  !1
          8    >   IS_SMALLER                                               !1, 1000
          9      > JMPNZ                                                    ~8, ->5
   21    10    > > RETURN                                                   null

End of function leclone

Function lejson:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
Branch analysis from position: 3
filename:       /in/k5KfJ
function name:  leJson
number of ops:  10
compiled vars:  !0 = $json, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   ASSIGN                                                   !0, '%7B%7D'
   27     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->7
   28     3    >   INIT_FCALL                                               'json_decode'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   27     6        PRE_INC                                                  !1
          7    >   IS_SMALLER                                               !1, 1000
          8      > JMPNZ                                                    ~6, ->3
   29     9    > > RETURN                                                   null

End of function lejson

Function lereflection:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 6
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 6
Branch analysis from position: 11
Branch analysis from position: 6
filename:       /in/k5KfJ
function name:  leReflection
number of ops:  12
compiled vars:  !0 = $class, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   NEW                                              $2      'ReflectionClass'
          1        SEND_VAL_EX                                              'stdClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   35     4        ASSIGN                                                   !1, 0
          5      > JMP                                                      ->9
   36     6    >   INIT_METHOD_CALL                                         !0, 'newInstance'
          7        DO_FCALL                                      0          
   35     8        PRE_INC                                                  !1
          9    >   IS_SMALLER                                               !1, 1000
         10      > JMPNZ                                                    ~8, ->6
   37    11    > > RETURN                                                   null

End of function lereflection

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.47 ms | 1407 KiB | 22 Q