3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Laravel; use Closure, ArrayAccess; class View implements ArrayAccess { /** * The name of the view. * * @var string */ public $view; /** * The view data. * * @var array */ public $data; /** * The path to the view on disk. * * @var string */ public $path; /** * All of the shared view data. * * @var array */ public static $shared = array(); /** * All of the registered view names. * * @var array */ public static $names = array(); /** * The cache content of loaded view files. * * @var array */ public static $cache = array(); /** * THe last view to be rendered. * * @var string */ public static $last; /** * The render operations taking place. * * @var int */ public static $render_count = 0; /** * The Laravel view loader event name. * * @var string */ const loader = 'laravel.view.loader'; /** * The Laravel view engine event name. * * @var string */ const engine = 'laravel.view.engine'; /** * Create a new view instance. * * <code> * // Create a new view instance * $view = new View('home.index'); * * // Create a new view instance of a bundle's view * $view = new View('admin::home.index'); * * // Create a new view instance with bound data * $view = new View('home.index', array('name' => 'Taylor')); * </code> * * @param string $view * @param array $data * @return void */ public function __construct($view, $data = array()) { $this->view = $view; $this->data = $data; // In order to allow developers to load views outside of the normal loading // conventions, we'll allow for a raw path to be given in place of the // typical view name, giving total freedom on view loading. if (starts_with($view, 'path: ')) { $this->path = substr($view, 6); } else { $this->path = $this->path($view); } // If a session driver has been specified, we will bind an instance of the // validation error message container to every view. If an error instance // exists in the session, we will use that instance. if ( ! isset($this->data['errors'])) { if (Session::started() and Session::has('errors')) { $this->data['errors'] = Session::get('errors'); } else { $this->data['errors'] = new Messages; } } } /** * Determine if the given view exists. * * @param string $view * @param boolean $return_path * @return string|bool */ public static function exists($view, $return_path = false) { if (starts_with($view, 'name: ') and array_key_exists($name = substr($view, 6), static::$names)) { $view = static::$names[$name]; } list($bundle, $view) = Bundle::parse($view); $view = str_replace('.', '/', $view); // We delegate the determination of view paths to the view loader event // so that the developer is free to override and manage the loading // of views in any way they see fit for their application. $path = Event::until(static::loader, array($bundle, $view)); if ( ! is_null($path)) { return $return_path ? $path : true; } return false; } /** * Get the path to a given view on disk. * * @param string $view * @return string */ protected function path($view) { if ($path = $this->exists($view,true)) { return $path; } throw new \Exception("View [$view] doesn't exist."); } /** * Get the path to a view using the default folder convention. * * @param string $bundle * @param string $view * @param string $directory * @return string */ public static function file($bundle, $view, $directory) { $directory = str_finish($directory, DS); // Views may have either the default PHP file extension or the "Blade" // extension, so we will need to check for both in the view path // and return the first one we find for the given view. if (file_exists($path = $directory.$view.EXT)) { return $path; } elseif (file_exists($path = $directory.$view.BLADE_EXT)) { return $path; } } /** * Create a new view instance. * * <code> * // Create a new view instance * $view = View::make('home.index'); * * // Create a new view instance of a bundle's view * $view = View::make('admin::home.index'); * * // Create a new view instance with bound data * $view = View::make('home.index', array('name' => 'Taylor')); * </code> * * @param string $view * @param array $data * @return View */ public static function make($view, $data = array()) { return new static($view, $data); } /** * Create a new view instance of a named view. * * <code> * // Create a new named view instance * $view = View::of('profile'); * * // Create a new named view instance with bound data * $view = View::of('profile', array('name' => 'Taylor')); * </code> * * @param string $name * @param array $data * @return View */ public static function of($name, $data = array()) { return new static(static::$names[$name], $data); } /** * Assign a name to a view. * * <code> * // Assign a name to a view * View::name('partials.profile', 'profile'); * * // Resolve an instance of a named view * $view = View::of('profile'); * </code> * * @param string $view * @param string $name * @return void */ public static function name($view, $name) { static::$names[$name] = $view; } /** * Register a view composer with the Event class. * * <code> * // Register a composer for the "home.index" view * View::composer('home.index', function($view) * { * $view['title'] = 'Home'; * }); * </code> * * @param string|array $views * @param Closure $composer * @return void */ public static function composer($views, $composer) { $views = (array) $views; foreach ($views as $view) { Event::listen("laravel.composing: {$view}", $composer); } } /** * Get the rendered contents of a partial from a loop. * * @param string $view * @param array $data * @param string $iterator * @param string $empty * @return string */ public static function render_each($view, array $data, $iterator, $empty = 'raw|') { $result = ''; // If is actually data in the array, we will loop through the data and // append an instance of the partial view to the final result HTML, // passing in the iterated value of the data array. if (is_array($data) and count($data) > 0) { foreach ($data as $key => $value) { $with = array('key' => $key, $iterator => $value); $result .= render($view, $with); } } // If there is no data in the array, we will render the contents of // the "empty" view. Alternatively, the "empty view" can be a raw // string that is prefixed with "raw|" for convenience. else { if (starts_with($empty, 'raw|')) { $result = substr($empty, 4); } else { $result = render($empty); } } return $result; } /** * Get the evaluated string content of the view. * * @return string */ public function render() { static::$render_count++; Event::fire("laravel.composing: {$this->view}", array($this)); $contents = null; // If there are listeners to the view engine event, we'll pass them // the view so they can render it according to their needs, which // allows easy attachment of other view parsers. if (Event::listeners(static::engine)) { $result = Event::until(static::engine, array($this)); if ( ! is_null($result)) $contents = $result; } if (is_null($contents)) $contents = $this->get(); static::$render_count--; if (static::$render_count == 0) { Section::$sections = array(); } return $contents; } /** * Get the evaluated contents of the view. * * @return string */ public function get() { $__data = $this->data(); // The contents of each view file is cached in an array for the // request since partial views may be rendered inside of for // loops which could incur performance penalties. ob_start(); extract($__data, EXTR_SKIP); include $this->path; // We'll include the view contents for parsing within a catcher // so we can avoid any WSOD errors. If an exception occurs we // will throw it out to the exception handler. $content = ob_get_clean(); unset($__data); // The view filter event gives us a last chance to modify the // evaluated contents of the view and return them. This lets // us do something like run the contents through Jade, etc. if (Event::listeners('view.filter')) { return Event::first('view.filter', array($content, $this->path)); } return $content; } /** * Get the contents of the view file from disk. * * @return string */ protected function load() { static::$last = array('name' => $this->view, 'path' => $this->path); if (isset(static::$cache[$this->path])) { return static::$cache[$this->path]; } else { $pathba = $this->path; include $pathba; #return static::$cache[$this->path] = $sta; } } /** * Get the array of view data for the view instance. * * The shared view data will be combined with the view data. * * @return array */ public function data() { $data = array_merge($this->data, static::$shared); // All nested views and responses are evaluated before the main view. // This allows the assets used by nested views to be added to the // asset container before the main view is evaluated. foreach ($data as $key => $value) { if ($value instanceof View or $value instanceof Response) { $data[$key] = $value->render(); } } return $data; } /** * Add a view instance to the view data. * * <code> * // Add a view instance to a view's data * $view = View::make('foo')->nest('footer', 'partials.footer'); * * // Equivalent functionality using the "with" method * $view = View::make('foo')->with('footer', View::make('partials.footer')); * </code> * * @param string $key * @param string $view * @param array $data * @return View */ public function nest($key, $view, $data = array()) { return $this->with($key, static::make($view, $data)); } /** * Add a key / value pair to the view data. * * Bound data will be available to the view as variables. * * @param string $key * @param mixed $value * @return View */ public function with($key, $value = null) { if (is_array($key)) { $this->data = array_merge($this->data, $key); } else { $this->data[$key] = $value; } return $this; } /** * Add a key / value pair to the shared view data. * * Shared view data is accessible to every view created by the application. * * @param string $key * @param mixed $value * @return View */ public function shares($key, $value) { static::share($key, $value); return $this; } /** * Add a key / value pair to the shared view data. * * Shared view data is accessible to every view created by the application. * * @param string $key * @param mixed $value * @return void */ public static function share($key, $value) { static::$shared[$key] = $value; } /** * Implementation of the ArrayAccess offsetExists method. */ public function offsetExists($offset) { return array_key_exists($offset, $this->data); } /** * Implementation of the ArrayAccess offsetGet method. */ public function offsetGet($offset) { if (isset($this[$offset])) return $this->data[$offset]; } /** * Implementation of the ArrayAccess offsetSet method. */ public function offsetSet($offset, $value) { $this->data[$offset] = $value; } /** * Implementation of the ArrayAccess offsetUnset method. */ public function offsetUnset($offset) { unset($this->data[$offset]); } /** * Magic Method for handling dynamic data access. */ public function __get($key) { return $this->data[$key]; } /** * Magic Method for handling the dynamic setting of data. */ public function __set($key, $value) { $this->data[$key] = $value; } /** * Magic Method for checking dynamically-set data. */ public function __isset($key) { return isset($this->data[$key]); } /** * Get the evaluated string content of the view. * * @return string */ public function __toString() { return $this->render(); } /** * Magic Method for handling dynamic functions. * * This method handles calls to dynamic with helpers. */ public function __call($method, $parameters) { if (strpos($method, 'with_') === 0) { $key = substr($method, 5); return $this->with($key, $parameters[0]); } throw new \Exception("Method [$method] is not defined on the View class."); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AaDIV
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'laravel%5Cview'
  604     1      > RETURN                                                   1

Class Laravel\View:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 18
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 47
Branch analysis from position: 27
2 jumps found. (Code = 46) Position 1 = 30, Position 2 = 34
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 42
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
Branch analysis from position: 47
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 47
Branch analysis from position: 27
Branch analysis from position: 47
filename:       /in/AaDIV
function name:  __construct
number of ops:  48
compiled vars:  !0 = $view, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   93     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <array>
   95     2        ASSIGN_OBJ                                               'view'
          3        OP_DATA                                                  !0
   96     4        ASSIGN_OBJ                                               'data'
          5        OP_DATA                                                  !1
  101     6        INIT_NS_FCALL_BY_NAME                                    'Laravel%5Cstarts_with'
          7        SEND_VAR_EX                                              !0
          8        SEND_VAL_EX                                              'path%3A+'
          9        DO_FCALL                                      0  $4      
         10      > JMPZ                                                     $4, ->18
  103    11    >   INIT_NS_FCALL_BY_NAME                                    'Laravel%5Csubstr'
         12        SEND_VAR_EX                                              !0
         13        SEND_VAL_EX                                              6
         14        DO_FCALL                                      0  $6      
         15        ASSIGN_OBJ                                               'path'
         16        OP_DATA                                                  $6
         17      > JMP                                                      ->23
  107    18    >   INIT_METHOD_CALL                                         'path'
         19        SEND_VAR_EX                                              !0
         20        DO_FCALL                                      0  $8      
         21        ASSIGN_OBJ                                               'path'
         22        OP_DATA                                                  $8
  113    23    >   FETCH_OBJ_IS                                     ~9      'data'
         24        ISSET_ISEMPTY_DIM_OBJ                         0  ~10     ~9, 'errors'
         25        BOOL_NOT                                         ~11     ~10
         26      > JMPZ                                                     ~11, ->47
  115    27    >   INIT_STATIC_METHOD_CALL                                  'Laravel%5CSession', 'started'
         28        DO_FCALL                                      0  $12     
         29      > JMPZ_EX                                          ~13     $12, ->34
         30    >   INIT_STATIC_METHOD_CALL                                  'Laravel%5CSession', 'has'
         31        SEND_VAL_EX                                              'errors'
         32        DO_FCALL                                      0  $14     
         33        BOOL                                             ~13     $14
         34    > > JMPZ                                                     ~13, ->42
  117    35    >   INIT_STATIC_METHOD_CALL                                  'Laravel%5CSession', 'get'
         36        SEND_VAL_EX                                              'errors'
         37        DO_FCALL                                      0  $17     
         38        FETCH_OBJ_W                                      $15     'data'
         39        ASSIGN_DIM                                               $15, 'errors'
         40        OP_DATA                                                  $17
         41      > JMP                                                      ->47
  121    42    >   NEW                                              $20     'Laravel%5CMessages'
         43        DO_FCALL                                      0          
         44        FETCH_OBJ_W                                      $18     'data'
         45        ASSIGN_DIM                                               $18, 'errors'
         46        OP_DATA                                                  $20
  124    47    > > RETURN                                                   null

End of function __construct

Function exists:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 7, Position 2 = 19
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 23
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 50, Position 2 = 55
Branch analysis from position: 50
2 jumps found. (Code = 43) Position 1 = 51, Position 2 = 53
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 53
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
Branch analysis from position: 19
filename:       /in/AaDIV
function name:  exists
number of ops:  57
compiled vars:  !0 = $view, !1 = $return_path, !2 = $name, !3 = $bundle, !4 = $path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  133     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <false>
  135     2        INIT_NS_FCALL_BY_NAME                                    'Laravel%5Cstarts_with'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAL_EX                                              'name%3A+'
          5        DO_FCALL                                      0  $5      
          6      > JMPZ_EX                                          ~6      $5, ->19
          7    >   INIT_NS_FCALL_BY_NAME                                    'Laravel%5Carray_key_exists'
          8        INIT_NS_FCALL_BY_NAME                                    'Laravel%5Csubstr'
          9        SEND_VAR_EX                                              !0
         10        SEND_VAL_EX                                              6
         11        DO_FCALL                                      0  $7      
         12        ASSIGN                                           ~8      !2, $7
         13        SEND_VAL_EX                                              ~8
         14        CHECK_FUNC_ARG                                           
         15        FETCH_STATIC_PROP_FUNC_ARG   unknown             $9      'names'
         16        SEND_FUNC_ARG                                            $9
         17        DO_FCALL                                      0  $10     
         18        BOOL                                             ~6      $10
         19    > > JMPZ                                                     ~6, ->23
  137    20    >   FETCH_STATIC_PROP_R          unknown             ~11     'names'
         21        FETCH_DIM_R                                      ~12     ~11, !2
         22        ASSIGN                                                   !0, ~12
  140    23    >   INIT_STATIC_METHOD_CALL                                  'Laravel%5CBundle', 'parse'
         24        SEND_VAR_EX                                              !0
         25        DO_FCALL                                      0  $14     
         26        FETCH_LIST_R                                     $15     $14, 0
         27        ASSIGN                                                   !3, $15
         28        FETCH_LIST_R                                     $17     $14, 1
         29        ASSIGN                                                   !0, $17
         30        FREE                                                     $14
  142    31        INIT_NS_FCALL_BY_NAME                                    'Laravel%5Cstr_replace'
         32        SEND_VAL_EX                                              '.'
         33        SEND_VAL_EX                                              '%2F'
         34        SEND_VAR_EX                                              !0
         35        DO_FCALL                                      0  $19     
         36        ASSIGN                                                   !0, $19
  147    37        INIT_STATIC_METHOD_CALL                                  'Laravel%5CEvent', 'until'
         38        FETCH_CLASS_CONSTANT                             ~21     'loader'
         39        SEND_VAL_EX                                              ~21
         40        INIT_ARRAY                                       ~22     !3
         41        ADD_ARRAY_ELEMENT                                ~22     !0
         42        SEND_VAL_EX                                              ~22
         43        DO_FCALL                                      0  $23     
         44        ASSIGN                                                   !4, $23
  149    45        INIT_NS_FCALL_BY_NAME                                    'Laravel%5Cis_null'
         46        SEND_VAR_EX                                              !4
         47        DO_FCALL                                      0  $25     
         48        BOOL_NOT                                         ~26     $25
         49      > JMPZ                                                     ~26, ->55
  151    50    > > JMPZ                                                     !1, ->53
         51    >   QM_ASSIGN                                        ~27     !4
         52      > JMP                                                      ->54
         53    >   QM_ASSIGN                                        ~27     <true>
         54    > > RETURN                                                   ~27
  154    55    > > RETURN                                                   <false>
  155    56*     > RETURN                                                   null

End of function exists

Function path:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/AaDIV
function name:  path
number of ops:  16
compiled vars:  !0 = $view, !1 = $path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  163     0  E >   RECV                                             !0      
  165     1        INIT_METHOD_CALL                                         'exists'
          2        SEND_VAR_EX                                              !0
          3        SEND_VAL_EX                                              <true>
          4        DO_FCALL                                      0  $2      
          5        ASSIGN                                           ~3      !1, $2
          6      > JMPZ                                                     ~3, ->8
  167     7    > > RETURN                                                   !1
  170     8    >   NEW                                              $4      'Exception'
          9        ROPE_INIT                                     3  ~6      'View+%5B'
         10        ROPE_ADD                                      1  ~6      ~6, !0
         11        ROPE_END                                      2  ~5      ~6, '%5D+doesn%27t+exist.'
         12        SEND_VAL_EX                                              ~5
         13        DO_FCALL                                      0          
         14      > THROW                                         0          $4
  171    15*     > RETURN                                                   null

End of function path

Function file:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 28
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AaDIV
function name:  file
number of ops:  29
compiled vars:  !0 = $bundle, !1 = $view, !2 = $directory, !3 = $path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  181     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
  183     3        INIT_NS_FCALL_BY_NAME                                    'Laravel%5Cstr_finish'
          4        SEND_VAR_EX                                              !2
          5        FETCH_CONSTANT                                   ~4      'Laravel%5CDS'
          6        SEND_VAL_EX                                              ~4
          7        DO_FCALL                                      0  $5      
          8        ASSIGN                                                   !2, $5
  188     9        INIT_NS_FCALL_BY_NAME                                    'Laravel%5Cfile_exists'
         10        CONCAT                                           ~7      !2, !1
         11        FETCH_CONSTANT                                   ~8      'Laravel%5CEXT'
         12        CONCAT                                           ~9      ~7, ~8
         13        ASSIGN                                           ~10     !3, ~9
         14        SEND_VAL_EX                                              ~10
         15        DO_FCALL                                      0  $11     
         16      > JMPZ                                                     $11, ->19
  190    17    > > RETURN                                                   !3
         18*       JMP                                                      ->28
  192    19    >   INIT_NS_FCALL_BY_NAME                                    'Laravel%5Cfile_exists'
         20        CONCAT                                           ~12     !2, !1
         21        FETCH_CONSTANT                                   ~13     'Laravel%5CBLADE_EXT'
         22        CONCAT                                           ~14     ~12, ~13
         23        ASSIGN                                           ~15     !3, ~14
         24        SEND_VAL_EX                                              ~15
         25        DO_FCALL                                      0  $16     
         26      > JMPZ                                                     $16, ->28
  194    27    > > RETURN                                                   !3
  196    28    > > RETURN                                                   null

End of function file

Function make:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AaDIV
function name:  make
number of ops:  8
compiled vars:  !0 = $view, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  216     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <array>
  218     2        NEW                          static              $2      
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0          
          6      > RETURN                                                   $2
  219     7*     > RETURN                                                   null

End of function make

Function of:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AaDIV
function name:  of
number of ops:  11
compiled vars:  !0 = $name, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  236     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <array>
  238     2        NEW                          static              $2      
          3        CHECK_FUNC_ARG                                           
          4        FETCH_STATIC_PROP_FUNC_ARG   unknown             $3      'names'
          5        FETCH_DIM_FUNC_ARG                               $4      $3, !0
          6        SEND_FUNC_ARG                                            $4
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0          
          9      > RETURN                                                   $2
  239    10*     > RETURN                                                   null

End of function of

Function name:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AaDIV
function name:  name
number of ops:  6
compiled vars:  !0 = $view, !1 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  256     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  258     2        FETCH_STATIC_PROP_W          global              $2      'names'
          3        ASSIGN_DIM                                               $2, !1
          4        OP_DATA                                                  !0
  259     5      > RETURN                                                   null

End of function name

Function composer:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 13
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/AaDIV
function name:  composer
number of ops:  15
compiled vars:  !0 = $views, !1 = $composer, !2 = $view
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  276     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  278     2        CAST                                          7  ~3      !0
          3        ASSIGN                                                   !0, ~3
  280     4      > FE_RESET_R                                       $5      !0, ->13
          5    > > FE_FETCH_R                                               $5, !2, ->13
  282     6    >   INIT_STATIC_METHOD_CALL                                  'Laravel%5CEvent', 'listen'
          7        NOP                                                      
          8        FAST_CONCAT                                      ~6      'laravel.composing%3A+', !2
          9        SEND_VAL_EX                                              ~6
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0          
  280    12      > JMP                                                      ->5
         13    >   FE_FREE                                                  $5
  284    14      > RETURN                                                   null

End of function composer

Function render_each:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 29
Branch analysis from position: 15
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 27
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 27
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 40
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/AaDIV
function name:  render_each
number of ops:  46
compiled vars:  !0 = $view, !1 = $data, !2 = $iterator, !3 = $empty, !4 = $result, !5 = $value, !6 = $key, !7 = $with
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  295     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV_INIT                                        !3      'raw%7C'
  297     4        ASSIGN                                                   !4, ''
  302     5        INIT_NS_FCALL_BY_NAME                                    'Laravel%5Cis_array'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0  $9      
          8      > JMPZ_EX                                          ~10     $9, ->14
          9    >   INIT_NS_FCALL_BY_NAME                                    'Laravel%5Ccount'
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0  $11     
         12        IS_SMALLER                                       ~12     0, $11
         13        BOOL                                             ~10     ~12
         14    > > JMPZ                                                     ~10, ->29
  304    15    > > FE_RESET_R                                       $13     !1, ->27
         16    > > FE_FETCH_R                                       ~14     $13, !5, ->27
         17    >   ASSIGN                                                   !6, ~14
  306    18        INIT_ARRAY                                       ~16     !6, 'key'
         19        ADD_ARRAY_ELEMENT                                ~16     !5, !2
         20        ASSIGN                                                   !7, ~16
  308    21        INIT_NS_FCALL_BY_NAME                                    'Laravel%5Crender'
         22        SEND_VAR_EX                                              !0
         23        SEND_VAR_EX                                              !7
         24        DO_FCALL                                      0  $18     
         25        ASSIGN_OP                                     8          !4, $18
  304    26      > JMP                                                      ->16
         27    >   FE_FREE                                                  $13
         28      > JMP                                                      ->44
  317    29    >   INIT_NS_FCALL_BY_NAME                                    'Laravel%5Cstarts_with'
         30        SEND_VAR_EX                                              !3
         31        SEND_VAL_EX                                              'raw%7C'
         32        DO_FCALL                                      0  $20     
         33      > JMPZ                                                     $20, ->40
  319    34    >   INIT_NS_FCALL_BY_NAME                                    'Laravel%5Csubstr'
         35        SEND_VAR_EX                                              !3
         36        SEND_VAL_EX                                              4
         37        DO_FCALL                                      0  $21     
         38        ASSIGN                                                   !4, $21
         39      > JMP                                                      ->44
  323    40    >   INIT_NS_FCALL_BY_NAME                                    'Laravel%5Crender'
         41        SEND_VAR_EX                                              !3
         42        DO_FCALL                                      0  $23     
         43        ASSIGN                                                   !4, $23
  327    44    > > RETURN                                                   !4
  328    45*     > RETURN                                                   null

End of function render_each

Function render:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 30
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 30
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 37
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 43
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
Branch analysis from position: 37
Branch analysis from position: 30
Branch analysis from position: 30
filename:       /in/AaDIV
function name:  render
number of ops:  45
compiled vars:  !0 = $contents, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  337     0  E >   PRE_INC_STATIC_PROP                                      'render_count'
  339     1        INIT_STATIC_METHOD_CALL                                  'Laravel%5CEvent', 'fire'
          2        NOP                                                      
          3        FETCH_OBJ_R                                      ~3      'view'
          4        FAST_CONCAT                                      ~4      'laravel.composing%3A+', ~3
          5        SEND_VAL_EX                                              ~4
          6        FETCH_THIS                                       ~5      
          7        INIT_ARRAY                                       ~6      ~5
          8        SEND_VAL_EX                                              ~6
          9        DO_FCALL                                      0          
  341    10        ASSIGN                                                   !0, null
  346    11        INIT_STATIC_METHOD_CALL                                  'Laravel%5CEvent', 'listeners'
         12        FETCH_CLASS_CONSTANT                             ~9      'engine'
         13        SEND_VAL_EX                                              ~9
         14        DO_FCALL                                      0  $10     
         15      > JMPZ                                                     $10, ->30
  348    16    >   INIT_STATIC_METHOD_CALL                                  'Laravel%5CEvent', 'until'
         17        FETCH_CLASS_CONSTANT                             ~11     'engine'
         18        SEND_VAL_EX                                              ~11
         19        FETCH_THIS                                       ~12     
         20        INIT_ARRAY                                       ~13     ~12
         21        SEND_VAL_EX                                              ~13
         22        DO_FCALL                                      0  $14     
         23        ASSIGN                                                   !1, $14
  350    24        INIT_NS_FCALL_BY_NAME                                    'Laravel%5Cis_null'
         25        SEND_VAR_EX                                              !1
         26        DO_FCALL                                      0  $16     
         27        BOOL_NOT                                         ~17     $16
         28      > JMPZ                                                     ~17, ->30
         29    >   ASSIGN                                                   !0, !1
  353    30    >   INIT_NS_FCALL_BY_NAME                                    'Laravel%5Cis_null'
         31        SEND_VAR_EX                                              !0
         32        DO_FCALL                                      0  $19     
         33      > JMPZ                                                     $19, ->37
         34    >   INIT_METHOD_CALL                                         'get'
         35        DO_FCALL                                      0  $20     
         36        ASSIGN                                                   !0, $20
  355    37    >   PRE_DEC_STATIC_PROP                                      'render_count'
  357    38        FETCH_STATIC_PROP_R          unknown             ~23     'render_count'
         39        IS_EQUAL                                                 ~23, 0
         40      > JMPZ                                                     ~24, ->43
  359    41    >   ASSIGN_STATIC_PROP                                       'sections', 'Laravel%5CSection'
         42        OP_DATA                                                  <array>
  362    43    > > RETURN                                                   !0
  363    44*     > RETURN                                                   null

End of function render

Function get:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 28
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AaDIV
function name:  get
number of ops:  30
compiled vars:  !0 = $__data, !1 = $content
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  372     0  E >   INIT_METHOD_CALL                                         'data'
          1        DO_FCALL                                      0  $2      
     

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
287.43 ms | 1430 KiB | 34 Q