3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private static function b($seatNumber) { return str_pad(intval($seatNumber), 3, "0", STR_PAD_LEFT); } public function call() { print_r(self::b(4)); } } $a = new A; $a->call();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LIDHF
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_METHOD_CALL                                         !0, 'call'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class A:
Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LIDHF
function name:  b
number of ops:  10
compiled vars:  !0 = $seatNumber
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'str_pad'
          2        CAST                                          4  ~1      !0
          3        SEND_VAL                                                 ~1
          4        SEND_VAL                                                 3
          5        SEND_VAL                                                 '0'
          6        SEND_VAL                                                 0
          7        DO_ICALL                                         $2      
          8      > RETURN                                                   $2
    7     9*     > RETURN                                                   null

End of function b

Function call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LIDHF
function name:  call
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_STATIC_METHOD_CALL                                  'b'
          2        SEND_VAL                                                 4
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   12     6      > RETURN                                                   null

End of function call

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.38 ms | 1395 KiB | 17 Q