3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php use Symfony\Component\Finder\Finder; class BonesSingleton { public static $instance; public static function getInstance() { if (null === static::$instance) { static::$instance = new static(); } return static::$instance; } protected function __construct() { } private function __clone() { } private function __wakeup() { } } class TwigSingleton extends BonesSingleton { public $twig = false; public $templates = array(); protected function __construct() { $this->getTemplates(); $loader = new Twig_Loader_Array($this->templates); $twigEnv = new Twig_Environment($loader, array('debug' => true)); $imageFunc = new Twig_SimpleFunction('imagesrc', 'show_image', array('is_safe' => array('html'))); $doShortcodeFunc = new Twig_SimpleFunction('do_shortcode', function ($content, $ignore_html = false) { return do_shortcode($content, $ignore_html); }, array('is_safe' => array('html'))); $doBlockFunc = new Twig_SimpleFunction('localize_url', function ($url, $ignore_html = false) { return localize_url($url); }, array('is_safe' => array('html'))); $addEncoFunc = new Twig_SimpleFunction('add_enc',function($redirect_page){ return '<input type="hidden" name="uenc" value="'. Mage::helper('core')->urlEncode(Mage::helper('cms/page')->getPageUrl($redirect_page)).'"/>'; }, array('is_safe' => array('html'))); $twigEnv->addExtension(new Twig_Extension_Debug()); $twigEnv->addFunction($imageFunc); $twigEnv->addFunction($doShortcodeFunc); $twigEnv->addFunction($doBlockFunc); $twigEnv->addFunction($addEncoFunc); $this->twig = $twigEnv; } public function getTwig() { return $this->twig; } public function getTemplates() { //execute all the pattern portfolio parts $this->get_templates_for('04-pages', 'pages'); $this->get_templates_for('03-templates', 'templates'); $this->get_templates_for('02-organisms', 'organisms'); $this->get_templates_for('01-molecules', 'molecules'); $this->get_templates_for('00-atoms', 'atoms'); } private function get_templates_for($folder, $prefix) { $pages = new Finder(); $pages->files()->in(PATTERNS_TEMPLATES . '/' . $folder)->name('*.twig'); foreach ($pages as $file) { $this->templates[$this->prepare_name($file, $prefix . '-')] = $file->getContents(); } } private function prepare_name($file, $prefix = '') { return $prefix . preg_replace('/^[_0-9\-]*/', '', $file->getBasename('.twig')); } } define('PATTERNS_TEMPLATES', dirname(ABSPATH) . '/skin/frontend/sophiehulme/uk/styleguide/source/_patterns'); function create_sh_link($link) { return $link; } function show_image($img, $size, $title = false, $classes = '', $animTarget = false, $lazyload) { $imgHtml = '<img class="block image auto-height js-anim-image ' . $classes . '" width="' . $img['width'] . '" height="' . $img['height'] . '" alt="' . $img['name'] . '" srcset="' . get_image_group_srcset($img, $size) . '"' . ($animTarget ? ' data-anim-target="' . $animTarget . '"' : '') . ' sizes="'. get_image_group_size($size).'">'; if ($title && is_string($title)) { return "<figure class='figure'> $imgHtml <figcaption class='figcaption t-header-small psy1'>$title</figcaption> </figure>"; } else { echo $imgHtml; } } function date_to_unix($date) { $dateTime = DateTime::createFromFormat('d/m/Y', $date); return $dateTime->getTimestamp(); } function should_be_visible($from, $to) { $currentTime = strtotime('now'); return (date_to_unix($from) < $currentTime && $currentTime < date_to_unix($to)); } //small singleton (Yeah I know) //lazy person loader function twig_render($name, $data, $debug) { return TwigSingleton::getInstance()->getTwig()->render($name, $data); }
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/4Ocuo
function name:  (null)
number of ops:  18
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E >   NOP                                                      
  31     1        NOP                                                      
         2        NOP                                                      
  92     3        INIT_FCALL                                               'define'
         4        SEND_VAL                                                 'PATTERNS_TEMPLATES'
         5        INIT_FCALL                                               'dirname'
         6        FETCH_CONSTANT                                   ~3      'ABSPATH'
         7        SEND_VAL                                                 ~3
         8        DO_ICALL                                         $4      
         9        CONCAT                                           ~5      $4, '%2Fskin%2Ffrontend%2Fsophiehulme%2Fuk%2Fstyleguide%2Fsource%2F_patterns'
        10        SEND_VAL                                                 ~5
        11        DO_ICALL                                                 
  94    12        NOP                                                      
  98    13        NOP                                                      
 110    14        NOP                                                      
 115    15        NOP                                                      
 122    16        NOP                                                      
 124    17      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F4Ocuo0x7fa7c0070408:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/4Ocuo
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $content, !1 = $ignore_html
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  42     0  E >   RECV                                             !0      
         1        RECV_INIT                                        !1      <false>
  43     2        INIT_FCALL_BY_NAME                                       'do_shortcode'
         3        SEND_VAR_EX                                              !0
         4        SEND_VAR_EX                                              !1
         5        DO_FCALL                                      0  $2      
         6      > RETURN                                                   $2
  44     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F4Ocuo0x7fa7c0070408

Function %00%7Bclosure%7D%2Fin%2F4Ocuo0x7fa7c00704c5:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/4Ocuo
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $url, !1 = $ignore_html
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  45     0  E >   RECV                                             !0      
         1        RECV_INIT                                        !1      <false>
  46     2        INIT_FCALL_BY_NAME                                       'localize_url'
         3        SEND_VAR_EX                                              !0
         4        DO_FCALL                                      0  $2      
         5      > RETURN                                                   $2
  47     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F4Ocuo0x7fa7c00704c5

Function %00%7Bclosure%7D%2Fin%2F4Ocuo0x7fa7c00705e7:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/4Ocuo
function name:  {closure}
number of ops:  17
compiled vars:  !0 = $redirect_page
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  48     0  E >   RECV                                             !0      
  49     1        INIT_STATIC_METHOD_CALL                                  'Mage', 'helper'
         2        SEND_VAL_EX                                              'core'
         3        DO_FCALL                                      0  $1      
         4        INIT_METHOD_CALL                                         $1, 'urlEncode'
         5        INIT_STATIC_METHOD_CALL                                  'Mage', 'helper'
         6        SEND_VAL_EX                                              'cms%2Fpage'
         7        DO_FCALL                                      0  $2      
         8        INIT_METHOD_CALL                                         $2, 'getPageUrl'
         9        SEND_VAR_EX                                              !0
        10        DO_FCALL                                      0  $3      
        11        SEND_VAR_NO_REF                               4          $3
        12        DO_FCALL                                      0  $4      
        13        CONCAT                                           ~5      '%3Cinput+type%3D%22hidden%22+name%3D%22uenc%22+value%3D%22', $4
        14        CONCAT                                           ~6      ~5, '%22%2F%3E'
        15      > RETURN                                                   ~6
  50    16*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F4Ocuo0x7fa7c00705e7

Function create_sh_link:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/4Ocuo
function name:  create_sh_link
number of ops:  3
compiled vars:  !0 = $link
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  94     0  E >   RECV                                             !0      
  95     1      > RETURN                                                   !0
  96     2*     > RETURN                                                   null

End of function create_sh_link

Function show_image:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 24, Position 2 = 28
Branch analysis from position: 24
Jump found. Position 1 = 29
Branch analysis from position: 29
Jump found. Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
Jump found. Position 1 = 41, Position 2 = 48
Branch analysis from position: 41
Jump found. Position 1 = -2
Branch analysis from position: 48
Jump found. Position 1 = -2
Branch analysis from position: 40
Branch analysis from position: 28
Jump found. Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
Branch analysis from position: 40
filename:       /in/4Ocuo
function name:  show_image
number of ops:  50
compiled vars:  !0 = $img, !1 = $size, !2 = $title, !3 = $classes, !4 = $animTarget, !5 = $lazyload, !6 = $imgHtml
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  98     0  E >   RECV                                             !0      
         1        RECV                                             !1      
         2        RECV_INIT                                        !2      <false>
         3        RECV_INIT                                        !3      ''
         4        RECV_INIT                                        !4      <false>
         5        RECV                                             !5      
  99     6        CONCAT                                           ~7      '%3Cimg+class%3D%22block+image+auto-height+js-anim-image+', !3
         7        CONCAT                                           ~8      ~7, '%22+width%3D%22'
         8        FETCH_DIM_R                                      $9      !0, 'width'
         9        CONCAT                                           ~10     ~8, $9
        10        CONCAT                                           ~11     ~10, '%22+height%3D%22'
        11        FETCH_DIM_R                                      $12     !0, 'height'
        12        CONCAT                                           ~13     ~11, $12
        13        CONCAT                                           ~14     ~13, '%22+alt%3D%22'
        14        FETCH_DIM_R                                      $15     !0, 'name'
        15        CONCAT                                           ~16     ~14, $15
        16        CONCAT                                           ~17     ~16, '%22+srcset%3D%22'
        17        INIT_FCALL_BY_NAME                                       'get_image_group_srcset'
        18        SEND_VAR_EX                                              !0
        19        SEND_VAR_EX                                              !1
        20        DO_FCALL                                      0  $18     
        21        CONCAT                                           ~19     ~17, $18
        22        CONCAT                                           ~20     ~19, '%22'
        23      > JMPZ                                                     !4, ->28
        24    >   CONCAT                                           ~21     '+data-anim-target%3D%22', !4
        25        CONCAT                                           ~22     ~21, '%22'
        26        QM_ASSIGN                                        ~23     ~22
        27      > JMP                                                      ->29
        28    >   QM_ASSIGN                                        ~23     ''
        29    >   CONCAT                                           ~24     ~20, ~23
        30        CONCAT                                           ~25     ~24, '+sizes%3D%22'
        31        INIT_FCALL_BY_NAME                                       'get_image_group_size'
        32        SEND_VAR_EX                                              !1
        33        DO_FCALL                                      0  $26     
        34        CONCAT                                           ~27     ~25, $26
        35        CONCAT                                           ~28     ~27, '%22%3E'
        36        ASSIGN                                                   !6, ~28
 100    37      > JMPZ_EX                                          ~30     !2, ->40
        38    >   TYPE_CHECK                                    6  ~31     !2
        39        BOOL                                             ~30     ~31
        40    > > JMPZ                                                     ~30, ->48
 102    41    >   ROPE_INIT                                     5  ~33     '%3Cfigure+class%3D%27figure%27%3E%0A++++'
        42        ROPE_ADD                                      1  ~33     ~33, !6
 103    43        ROPE_ADD                                      2  ~33     ~33, '%0A++++%3Cfigcaption+class%3D%27figcaption+t-header-small+psy1%27%3E'
        44        ROPE_ADD                                      3  ~33     ~33, !2
 104    45        ROPE_END                                      4  ~32     ~33, '%3C%2Ffigcaption%3E+++++++++++++%0A%3C%2Ffigure%3E'
        46      > RETURN                                                   ~32
        47*       JMP                                                      ->49
 106    48    >   ECHO                                                     !6
 108    49      > RETURN                                                   null

End of function show_image

Function date_to_unix:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/4Ocuo
function name:  date_to_unix
number of ops:  10
compiled vars:  !0 = $date, !1 = $dateTime
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
 110     0  E >   RECV                                             !0      
 111     1        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
         2        SEND_VAL_EX                                              'd%2Fm%2FY'
         3        SEND_VAR_EX                                              !0
         4        DO_FCALL                                      0  $2      
         5        ASSIGN                                                   !1, $2
 112     6        INIT_METHOD_CALL                                         !1, 'getTimestamp'
         7        DO_FCALL                                      0  $4      
         8      > RETURN                                                   $4
 113     9*     > RETURN                                                   null

End of function date_to_unix

Function should_be_visible:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
Jump found. Position 1 = -2
Branch analysis from position: 16
filename:       /in/4Ocuo
function name:  should_be_visible
number of ops:  18
compiled vars:  !0 = $from, !1 = $to, !2 = $currentTime
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
 115     0  E >   RECV                                             !0      
         1        RECV                                             !1      
 116     2        INIT_FCALL                                               'strtotime'
         3        SEND_VAL                                                 'now'
         4        DO_ICALL                                         $3      
         5        ASSIGN                                                   !2, $3
 117     6        INIT_FCALL                                               'date_to_unix'
         7        SEND_VAR                                                 !0
         8        DO_FCALL                                      0  $5      
         9        IS_SMALLER                                       ~6      $5, !2
        10      > JMPZ_EX                                          ~6      ~6, ->16
        11    >   INIT_FCALL                                               'date_to_unix'
        12        SEND_VAR                                                 !1
        13        DO_FCALL                                      0  $7      
        14        IS_SMALLER                                       ~8      !2, $7
        15        BOOL                                             ~6      ~8
        16    > > RETURN                                                   ~6
 118    17*     > RETURN                                                   null

End of function should_be_visible

Function twig_render:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/4Ocuo
function name:  twig_render
number of ops:  13
compiled vars:  !0 = $name, !1 = $data, !2 = $debug
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
 122     0  E >   RECV                                             !0      
         1        RECV                                             !1      
         2        RECV                                             !2      
 123     3        INIT_STATIC_METHOD_CALL                                  'TwigSingleton', 'getInstance'
         4        DO_FCALL                                      0  $3      
         5        INIT_METHOD_CALL                                         $3, 'getTwig'
         6        DO_FCALL                                      0  $4      
         7        INIT_METHOD_CALL                                         $4, 'render'
         8        SEND_VAR_EX                                              !0
         9        SEND_VAR_EX                                              !1
        10        DO_FCALL                                      0  $5      
        11      > RETURN                                                   $5
 124    12*     > RETURN                                                   null

End of function twig_render

Class BonesSingleton:
Function getinstance:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
Jump found. Position 1 = -2
Branch analysis from position: 10
filename:       /in/4Ocuo
function name:  getInstance
number of ops:  14
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  10     0  E >   FETCH_CLASS                                 515  :0      
         1        FETCH_R                      static member       $1      'instance'
         2        IS_IDENTICAL                                     ~2      null, $1
         3      > JMPZ                                                     ~2, ->10
  11     4    >   FETCH_CLASS                                 515  :3      
         5        FETCH_W                      static member       $4      'instance'
         6        FETCH_CLASS                                 515  :5      
         7        NEW                                              $6      :5
         8        DO_FCALL                                      0          
         9        ASSIGN                                                   $4, $6
  14    10    >   FETCH_CLASS                                 515  :9      
        11        FETCH_R                      static member       $10     'instance'
        12      > RETURN                                                   $10
  15    13*     > RETURN                                                   null

End of function getinstance

Function __construct:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/4Ocuo
function name:  __construct
number of ops:  1
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  19     0  E > > RETURN                                                   null

End of function __construct

Function __clone:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/4Ocuo
function name:  __clone
number of ops:  1
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  23     0  E > > RETURN                                                   null

End of function __clone

Function __wakeup:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/4Ocuo
function name:  __wakeup
number of ops:  1
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  27     0  E > > RETURN                                                   null

End of function __wakeup

End of class BonesSingleton.

Class TwigSingleton:
Function __construct:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/4Ocuo
function name:  __construct
number of ops:  59
compiled vars:  !0 = $loader, !1 = $twigEnv, !2 = $imageFunc, !3 = $doShortcodeFunc, !4 = $doBlockFunc, !5 = $addEncoFunc
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  38     0  E >   INIT_METHOD_CALL                                         'getTemplates'
         1        DO_FCALL                                      0          
  39     2        NEW                                              $7      :-4
         3        FETCH_OBJ_FUNC_ARG                               $8      'templates'
         4        SEND_VAR_EX                                              $8
         5        DO_FCALL                                      0          
         6        ASSIGN                                                   !0, $7
  40     7        NEW                                              $11     :-1
         8        SEND_VAR_EX                                              !0
         9        SEND_VAL_EX                                              <array>
        10        DO_FCALL                                      0          
        11        ASSIGN                                                   !1, $11
  41    12        NEW                                              $14     :2
        13        SEND_VAL_EX                                              'imagesrc'
        14        SEND_VAL_EX                                              'show_image'
        15        SEND_VAL_EX                                              <array>
        16        DO_FCALL                                      0          
        17        ASSIGN                                                   !2, $14
  42    18        NEW                                              $17     :7
        19        SEND_VAL_EX                                              'do_shortcode'
        20        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F4Ocuo0x7fa7c0070408'
  44    21        SEND_VAL_EX                                              ~18
        22        SEND_VAL_EX                                              <array>
        23        DO_FCALL                                      0          
        24        ASSIGN                                                   !3, $17
  45    25        NEW                                              $21     :12
        26        SEND_VAL_EX                                              'localize_url'
        27        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F4Ocuo0x7fa7c00704c5'
  47    28        SEND_VAL_EX                                              ~22
        29        SEND_VAL_EX                                              <array>
        30        DO_FCALL                                      0          
        31        ASSIGN                                                   !4, $21
  48    32        NEW                                              $25     :17
        33        SEND_VAL_EX                                              'add_enc'
        34        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F4Ocuo0x7fa7c00705e7'
  50    35        SEND_VAL_EX                                              ~26
        36        SEND_VAL_EX                                              <array>
        37        DO_FCALL                                      0          
        38        ASSIGN                                                   !5, $25
  51    39        INIT_METHOD_CALL                                         !1, 'addExtension'
        40        NEW                                              $29     :24
        41        DO_FCALL                                      0          
        42        SEND_VAR_NO_REF                               0          $29
        43        DO_FCALL                                      0          
  52    44        INIT_METHOD_CALL                                         !1, 'addFunction'
        45        SEND_VAR_EX                                              !2
        46        DO_FCALL                                      0          
  53    47        INIT_METHOD_CALL                                         !1, 'addFunction'
        48        SEND_VAR_EX                                              !3
        49        DO_FCALL                                      0          
  54    50        INIT_METHOD_CALL                                         !1, 'addFunction'
        51        SEND_VAR_EX                                              !4
        52        DO_FCALL                                      0          
  55    53        INIT_METHOD_CALL                                         !1, 'addFunction'
        54        SEND_VAR_EX                                              !5
        55        DO_FCALL                                      0          
  57    56        ASSIGN_OBJ                                               'twig'
        57        OP_DATA                                                  !1
  58    58      > RETURN                                                   null

End of function __construct

Function gettwig:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/4Ocuo
function name:  getTwig
number of ops:  3
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  61     0  E >   FETCH_OBJ_R                                      $0      'twig'
         1      > RETURN                                                   $0
  62     2*     > RETURN                                                   null

End of function gettwig

Function gettemplates:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/4Ocuo
function name:  getTemplates
number of ops:  21
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  66     0  E >   INIT_METHOD_CALL                                         'get_templates_for'
         1        SEND_VAL_EX                                              '04-pages'
         2        SEND_VAL_EX                                              'pages'
         3        DO_FCALL                                      0          
  68     4        INIT_METHOD_CALL                                         'get_templates_for'
         5        SEND_VAL_EX                                              '03-templates'
         6        SEND_VAL_EX                                              'templates'
         7        DO_FCALL                                      0          
  70     8        INIT_METHOD_CALL                                         'get_templates_for'
         9        SEND_VAL_EX                                              '02-organisms'
        10        SEND_VAL_EX                                              'organisms'
        11        DO_FCALL                                      0          
  72    12        INIT_METHOD_CALL                                         'get_templates_for'
        13        SEND_VAL_EX                                              '01-molecules'
        14        SEND_VAL_EX                                              'molecules'
        15        DO_FCALL                                      0          
  74    16        INIT_METHOD_CALL                                         'get_templates_for'
        17        SEND_VAL_EX                                              '00-atoms'
        18        SEND_VAL_EX                                              'atoms'
        19        DO_FCALL                                      0          
  75    20      > RETURN                                                   null

End of function gettemplates

Function get_templates_for:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 17, Position 2 = 29
Branch analysis from position: 17
Jump found. Position 1 = 18, Position 2 = 29
Branch analysis from position: 18
Jump found. Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 29
Jump found. Position 1 = -2
Branch analysis from position: 29
filename:       /in/4Ocuo
function name:  get_templates_for
number of ops:  31
compiled vars:  !0 = $folder, !1 = $prefix, !2 = $pages, !3 = $file
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  77     0  E >   RECV                                             !0      
         1        RECV                                             !1      
  78     2        NEW                                              $4      :-6
         3        DO_FCALL                                      0          
         4        ASSIGN                                                   !2, $4
  79     5        INIT_METHOD_CALL                                         !2, 'files'
         6        DO_FCALL                                      0  $7      
         7        INIT_METHOD_CALL                                         $7, 'in'
         8        FETCH_CONSTANT                                   ~8      'PATTERNS_TEMPLATES'
         9        CONCAT                                           ~9      ~8, '%2F'
        10        CONCAT                                           ~10     ~9, !0
        11        SEND_VAL_EX                                              ~10
        12        DO_FCALL                                      0  $11     
        13        INIT_METHOD_CALL                                         $11, 'name'
        14        SEND_VAL_EX                                              '%2A.twig'
        15        DO_FCALL                                      0          
  80    16      > FE_RESET_R                                       $13     !2, ->29
        17    > > FE_FETCH_R                                               $13, !3, ->29
  81    18    >   INIT_METHOD_CALL                                         'prepare_name'
        19        SEND_VAR_EX                                              !3
        20        CONCAT                                           ~15     !1, '-'
        21        SEND_VAL_EX                                              ~15
        22        DO_FCALL                                      0  $16     
        23        INIT_METHOD_CALL                                         !3, 'getContents'
        24        DO_FCALL                                      0  $18     
        25        FETCH_OBJ_W                                      $14     'templates'
        26        ASSIGN_DIM                                               $14, $16
        27        OP_DATA                                                  $18
        28      > JMP                                                      ->17
        29    >   FE_FREE                                                  $13
  83    30      > RETURN                                                   null

End of function get_templates_for

Function prepare_name:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/4Ocuo
function name:  prepare_name
number of ops:  13
compiled vars:  !0 = $file, !1 = $prefix
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  85     0  E >   RECV                                             !0      
         1        RECV_INIT                                        !1      ''
  87     2        INIT_FCALL                                               'preg_replace'
         3        SEND_VAL                                                 '%2F%5E%5B_0-9%5C-%5D%2A%2F'
         4        SEND_VAL                                                 ''
         5        INIT_METHOD_CALL                                         !0, 'getBasename'
         6        SEND_VAL_EX                                              '.twig'
         7        DO_FCALL                                      0  $2      
         8        SEND_VAR                                                 $2
         9        DO_ICALL                                         $3      
        10        CONCAT                                           ~4      !1, $3
        11      > RETURN                                                   ~4
  88    12*     > RETURN               

Generated using Vulcan Logic Dumper, using php 7.1.0