3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = 2000; class ClassMetadata { public $assocations; } class Association { public $inverse; public $name; public $joinColumn; public $joinTable; public $cascade; } $association = new Association(); $association->inverse = "foobar"; $association->name = "foobar"; $association->joinColumn = array("baz" => "boing"); $association->joinTable = "foobar"; $association->cascade = array("persist", "remove", "merge"); $cm = new ClassMetadata(); $cm->associations = array($association, $association); $start = microtime(true); for ($i = 0; $i < $n; $i++) { $data = unserialize(serialize($cm)); } echo number_format(microtime(true) - $start, 4) . "\n"; $cm->associations = array((array)$association, (array)$association); $start = microtime(true); for ($i = 0; $i < $n; $i++) { $data = unserialize(serialize($cm)); } echo number_format(microtime(true) - $start, 4) . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 27
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 67
Branch analysis from position: 67
2 jumps found. (Code = 44) Position 1 = 69, Position 2 = 59
Branch analysis from position: 69
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 59
2 jumps found. (Code = 44) Position 1 = 69, Position 2 = 59
Branch analysis from position: 69
Branch analysis from position: 59
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 27
Branch analysis from position: 37
Branch analysis from position: 27
filename:       /in/NiQXA
function name:  (null)
number of ops:  80
compiled vars:  !0 = $n, !1 = $association, !2 = $cm, !3 = $start, !4 = $i, !5 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 2000
   18     1        NEW                                              $7      'Association'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $7
   19     4        ASSIGN_OBJ                                               !1, 'inverse'
          5        OP_DATA                                                  'foobar'
   20     6        ASSIGN_OBJ                                               !1, 'name'
          7        OP_DATA                                                  'foobar'
   21     8        ASSIGN_OBJ                                               !1, 'joinColumn'
          9        OP_DATA                                                  <array>
   22    10        ASSIGN_OBJ                                               !1, 'joinTable'
         11        OP_DATA                                                  'foobar'
   23    12        ASSIGN_OBJ                                               !1, 'cascade'
         13        OP_DATA                                                  <array>
   25    14        NEW                                              $15     'ClassMetadata'
         15        DO_FCALL                                      0          
         16        ASSIGN                                                   !2, $15
   26    17        INIT_ARRAY                                       ~19     !1
         18        ADD_ARRAY_ELEMENT                                ~19     !1
         19        ASSIGN_OBJ                                               !2, 'associations'
         20        OP_DATA                                                  ~19
   28    21        INIT_FCALL                                               'microtime'
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $20     
         24        ASSIGN                                                   !3, $20
   29    25        ASSIGN                                                   !4, 0
         26      > JMP                                                      ->35
   30    27    >   INIT_FCALL                                               'unserialize'
         28        INIT_FCALL                                               'serialize'
         29        SEND_VAR                                                 !2
         30        DO_ICALL                                         $23     
         31        SEND_VAR                                                 $23
         32        DO_ICALL                                         $24     
         33        ASSIGN                                                   !5, $24
   29    34        PRE_INC                                                  !4
         35    >   IS_SMALLER                                               !4, !0
         36      > JMPNZ                                                    ~27, ->27
   32    37    >   INIT_FCALL                                               'number_format'
         38        INIT_FCALL                                               'microtime'
         39        SEND_VAL                                                 <true>
         40        DO_ICALL                                         $28     
         41        SUB                                              ~29     $28, !3
         42        SEND_VAL                                                 ~29
         43        SEND_VAL                                                 4
         44        DO_ICALL                                         $30     
         45        CONCAT                                           ~31     $30, '%0A'
         46        ECHO                                                     ~31
   34    47        CAST                                          7  ~33     !1
         48        INIT_ARRAY                                       ~34     ~33
         49        CAST                                          7  ~35     !1
         50        ADD_ARRAY_ELEMENT                                ~34     ~35
         51        ASSIGN_OBJ                                               !2, 'associations'
         52        OP_DATA                                                  ~34
   36    53        INIT_FCALL                                               'microtime'
         54        SEND_VAL                                                 <true>
         55        DO_ICALL                                         $36     
         56        ASSIGN                                                   !3, $36
   37    57        ASSIGN                                                   !4, 0
         58      > JMP                                                      ->67
   38    59    >   INIT_FCALL                                               'unserialize'
         60        INIT_FCALL                                               'serialize'
         61        SEND_VAR                                                 !2
         62        DO_ICALL                                         $39     
         63        SEND_VAR                                                 $39
         64        DO_ICALL                                         $40     
         65        ASSIGN                                                   !5, $40
   37    66        PRE_INC                                                  !4
         67    >   IS_SMALLER                                               !4, !0
         68      > JMPNZ                                                    ~43, ->59
   40    69    >   INIT_FCALL                                               'number_format'
         70        INIT_FCALL                                               'microtime'
         71        SEND_VAL                                                 <true>
         72        DO_ICALL                                         $44     
         73        SUB                                              ~45     $44, !3
         74        SEND_VAL                                                 ~45
         75        SEND_VAL                                                 4
         76        DO_ICALL                                         $46     
         77        CONCAT                                           ~47     $46, '%0A'
         78        ECHO                                                     ~47
         79      > RETURN                                                   1

Class ClassMetadata: [no user functions]
Class Association: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.98 ms | 1400 KiB | 21 Q