3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @since 3.0.0 * @license http://www.opensource.org/licenses/mit-license.php MIT License */ /** * Cell base. * */ class Cell { /** * Instance of the View created during rendering. Won't be set until after * Cell::__toString() is called. * * @var \Cake\View\View */ public $View; /** * Name of the action that was invoked. * * Action name will be inflected to get the template name when rendering. * * @var string */ public $action; /** * Rendering method. * * @param string $action Custom template name to render. If not provided (null), the last * value will be used. This value is automatically set by `CellTrait::cell()`. * @return void */ public function render($action = null) { if ($action !== null) { $this->action = $action; } return $this->__toString(); } /** * Magic method. * * Starts the rendering process when Cell is echoed. * * @return string Rendered cell */ public function __toString() { return $this->bla('action'); } public function bla($action) { throw new Exception('Not allowed'); } } $cell = new Cell();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7lgRl
function name:  (null)
number of ops:  5
compiled vars:  !0 = $cell
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   DECLARE_CLASS                                            'cell'
   70     1        NEW                                              $1      'Cell'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
          4      > RETURN                                                   1

Class Cell:
Function render:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/7lgRl
function name:  render
number of ops:  9
compiled vars:  !0 = $action
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   46     0  E >   RECV_INIT                                        !0      null
   47     1        TYPE_CHECK                                  1020          !0
          2      > JMPZ                                                     ~1, ->5
   48     3    >   ASSIGN_OBJ                                               'action'
          4        OP_DATA                                                  !0
   51     5    >   INIT_METHOD_CALL                                         '__toString'
          6        DO_FCALL                                      0  $3      
          7      > RETURN                                                   $3
   52     8*     > RETURN                                                   null

End of function render

Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7lgRl
function name:  __toString
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   62     0  E >   INIT_METHOD_CALL                                         'bla'
          1        SEND_VAL_EX                                              'action'
          2        DO_FCALL                                      0  $0      
          3        VERIFY_RETURN_TYPE                                       $0
          4      > RETURN                                                   $0
   63     5*       VERIFY_RETURN_TYPE                                       
          6*     > RETURN                                                   null

End of function __tostring

Function bla:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/7lgRl
function name:  bla
number of ops:  6
compiled vars:  !0 = $action
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   65     0  E >   RECV                                             !0      
   66     1        NEW                                              $1      'Exception'
          2        SEND_VAL_EX                                              'Not+allowed'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $1
   67     5*     > RETURN                                                   null

End of function bla

End of class Cell.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.56 ms | 1395 KiB | 13 Q