3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { private $string; private $int; private $bool; function __construct() { $this->string = "Nabir"; $this->int = 19; $this->bool = true; } function printDetails() { printf("Hello, my name is %s, I am $d years old and it is %b true that I am a male.", $this->string, $this->int, $this->bool); } } $instance = new Example(); echo $instance->printDetails(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pf10c
function name:  (null)
number of ops:  7
compiled vars:  !0 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'Example'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   26     3        INIT_METHOD_CALL                                         !0, 'printDetails'
          4        DO_FCALL                                      0  $4      
          5        ECHO                                                     $4
   29     6      > RETURN                                                   1

Class Example:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pf10c
function name:  __construct
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN_OBJ                                               'string'
          1        OP_DATA                                                  'Nabir'
   11     2        ASSIGN_OBJ                                               'int'
          3        OP_DATA                                                  19
   12     4        ASSIGN_OBJ                                               'bool'
          5        OP_DATA                                                  <true>
   14     6      > RETURN                                                   null

End of function __construct

Function printdetails:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pf10c
function name:  printDetails
number of ops:  13
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'printf'
          1        ROPE_INIT                                     3  ~2      'Hello%2C+my+name+is+%25s%2C+I+am+'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '+years+old+and+it+is+%25b+true+that+I+am+a+male.'
          4        SEND_VAL                                                 ~1
          5        FETCH_OBJ_R                                      ~4      'string'
          6        SEND_VAL                                                 ~4
          7        FETCH_OBJ_R                                      ~5      'int'
          8        SEND_VAL                                                 ~5
          9        FETCH_OBJ_R                                      ~6      'bool'
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                                 
   20    12      > RETURN                                                   null

End of function printdetails

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.1 ms | 1396 KiB | 15 Q