3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Defining __construct and filter makes filter a normal method class Filter { // PHP 4/5: E_STRICT "Redefining already defined constructor" // PHP 7: No error is raised // PHP 8: No error is raised function filter($a) { echo "In Filter::filter method\n"; } // This raises the E_STRICT in PHP 4/5 function __construct() { echo "In Filter constructor\n"; } } $f = new Filter(); $f->filter(3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rp9r5
function name:  (null)
number of ops:  7
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'Filter'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_METHOD_CALL                                         !0, 'filter'
          4        SEND_VAL_EX                                              3
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class Filter:
Function filter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rp9r5
function name:  filter
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ECHO                                                     'In+Filter%3A%3Afilter+method%0A'
    9     2      > RETURN                                                   null

End of function filter

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rp9r5
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ECHO                                                     'In+Filter+constructor%0A'
   14     1      > RETURN                                                   null

End of function __construct

End of class Filter.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.92 ms | 1393 KiB | 13 Q