3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Paginator { private $currentPageResolver; public function currentPage() { return ($this->currentPageResolver)(); } public function setCurrentPageResolver(\Closure $resolver) { $this->currentPageResolver = $resolver; } } $paginator = new Paginator(); $currentPage = $paginator->currentPage(); var_dump($currentPage);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DP8WE
function name:  (null)
number of ops:  10
compiled vars:  !0 = $paginator, !1 = $currentPage
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $2      'Paginator'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   19     3        INIT_METHOD_CALL                                         !0, 'currentPage'
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
   20     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class Paginator:
Function currentpage:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DP8WE
function name:  currentPage
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_OBJ_R                                      ~0      'currentPageResolver'
          1        INIT_DYNAMIC_CALL                                        ~0
          2        DO_FCALL                                      0  $1      
          3      > RETURN                                                   $1
   10     4*     > RETURN                                                   null

End of function currentpage

Function setcurrentpageresolver:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DP8WE
function name:  setCurrentPageResolver
number of ops:  4
compiled vars:  !0 = $resolver
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1        ASSIGN_OBJ                                               'currentPageResolver'
          2        OP_DATA                                                  !0
   15     3      > RETURN                                                   null

End of function setcurrentpageresolver

End of class Paginator.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.28 ms | 1395 KiB | 15 Q