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() { return printf("Hello! My name is %s, I am %d years old and it is $genderCheck that I am a male.", $this->string, $this->int, ($this->bool == true ? "true" : "false")); } } $instance = new Example(); echo $instance->printDetails(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pmp8e
function name:  (null)
number of ops:  7
compiled vars:  !0 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'Example'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   27     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/pmp8e
function name:  __construct
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN_OBJ                                               'string'
          1        OP_DATA                                                  'Nabir'
   13     2        ASSIGN_OBJ                                               'int'
          3        OP_DATA                                                  19
   14     4        ASSIGN_OBJ                                               'bool'
          5        OP_DATA                                                  <true>
   16     6      > RETURN                                                   null

End of function __construct

Function printdetails:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pmp8e
function name:  printDetails
number of ops:  19
compiled vars:  !0 = $genderCheck
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'printf'
          1        ROPE_INIT                                     3  ~2      'Hello%21+My+name+is+%25s%2C+I+am+%25d+years+old+and+it+is+'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '+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        BOOL                                             ~7      ~6
         11      > JMPZ                                                     ~7, ->14
         12    >   QM_ASSIGN                                        ~8      'true'
         13      > JMP                                                      ->15
         14    >   QM_ASSIGN                                        ~8      'false'
         15    >   SEND_VAL                                                 ~8
         16        DO_ICALL                                         $9      
         17      > RETURN                                                   $9
   22    18*     > RETURN                                                   null

End of function printdetails

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.42 ms | 1400 KiB | 15 Q