3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Model { private $id; public function setId($id) { $this->id = $id; } } $time = microtime(true); for ($i = 0; $i < 500000; $i++) { $model = new Model; $method = 'setId'; call_user_func_array(array($model, $method), array('test')); } $time = microtime(true) - $time; echo 'call user func took ' . number_format($time, 3) . ' seconds and returned ' . count($data_diff1) . " entries\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 6
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 6
Branch analysis from position: 19
Branch analysis from position: 6
filename:       /in/d9ip0
function name:  (null)
number of ops:  35
compiled vars:  !0 = $time, !1 = $i, !2 = $model, !3 = $method, !4 = $data_diff1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $5      
          3        ASSIGN                                                   !0, $5
   13     4        ASSIGN                                                   !1, 0
          5      > JMP                                                      ->17
   14     6    >   NEW                                              $8      'Model'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $8
   16     9        ASSIGN                                                   !3, 'setId'
   18    10        INIT_ARRAY                                       ~12     !2
         11        ADD_ARRAY_ELEMENT                                ~12     !3
         12        INIT_USER_CALL                                0          'call_user_func_array', ~12
         13        SEND_ARRAY                                               <array>
         14        CHECK_UNDEF_ARGS                                         
         15        DO_FCALL                                      0          
   13    16        PRE_INC                                                  !1
         17    >   IS_SMALLER                                               !1, 500000
         18      > JMPNZ                                                    ~15, ->6
   20    19    >   INIT_FCALL                                               'microtime'
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                         $16     
         22        SUB                                              ~17     $16, !0
         23        ASSIGN                                                   !0, ~17
   22    24        INIT_FCALL                                               'number_format'
         25        SEND_VAR                                                 !0
         26        SEND_VAL                                                 3
         27        DO_ICALL                                         $19     
         28        CONCAT                                           ~20     'call+user+func+took+', $19
         29        CONCAT                                           ~21     ~20, '+seconds+and+returned+'
         30        COUNT                                            ~22     !4
         31        CONCAT                                           ~23     ~21, ~22
         32        CONCAT                                           ~24     ~23, '+entries%0A'
         33        ECHO                                                     ~24
         34      > RETURN                                                   1

Class Model:
Function setid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d9ip0
function name:  setId
number of ops:  4
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        ASSIGN_OBJ                                               'id'
          2        OP_DATA                                                  !0
    9     3      > RETURN                                                   null

End of function setid

End of class Model.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.54 ms | 1400 KiB | 17 Q