3v4l.org

run code in 300+ PHP versions simultaneously
<?php function section(Closure $name){ return isset($name) ? $name() : null; } $html =' @title{ Çok güzel içerik yerine bu gelecek layout.blade.php\'de }@ @acontent{ yerine bunlar geliyor layout.blade.php\'de <p>Lorem ipsum dolor sit amet felan filan</p> <p>Sonra tekrar lorem ipsum dolor sit amet ?</p> }@ @title{ Çok güzel içerik yerine bu gelecek layout.blade.php\'de }@ @acontent{ yerine bunlar geliyor layout.blade.php\'de <p>Lorem ipsum dolor sit amet felan filan</p> <p>Sonra tekrar lorem ipsum dolor sit amet ?</p> }@ '; $value = preg_replace('/@(\w+)\s*\{/ms', '<? \$$1 = function(){ ?>', $html); $value = preg_replace('/}@/s', '<? }; ?>', $value); echo $value; ?> <? $title = function(){ ?> Çok güzel içerik yerine bu gelecek layout.blade.php'de <? }; ?> <? $acontent = function(){ ?> yerine bunlar geliyor layout.blade.php'de <p>Lorem ipsum dolor sit amet felan filan</p> <p>Sonra tekrar lorem ipsum dolor sit amet ?</p> <? }; ?> <? $fotter = function(){ ?> Çok güzel içerik yerine bu gelecek layout.blade.php'de <? }; ?> <? $icerik = function(){ ?> yerine bunlar geliyor layout.blade.php'de <p>Lorem ipsum dolor sit amet felan filan</p> <p>Sonra tekrar lorem ipsum dolor sit amet ?</p> <? }; ?> <html> <head> <title></title> </head> <body> <?= section($title); ?> <?= section($icerik);?> <footer><?= section($fotter);?></footer> </body> </html>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d3KqO
function name:  (null)
number of ops:  41
compiled vars:  !0 = $html, !1 = $value, !2 = $title, !3 = $acontent, !4 = $fotter, !5 = $icerik
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, '%0A%40title%7B%0A++++%C3%87ok+g%C3%BCzel+i%C3%A7erik+++yerine+bu+gelecek+layout.blade.php%27de%0A%7D%40%0A%0A%40acontent%7B%0Ayerine+bunlar+geliyor+layout.blade.php%27de%0A%3Cp%3ELorem+ipsum+dolor+sit+amet+felan+filan%3C%2Fp%3E%0A%3Cp%3ESonra+tekrar+lorem+ipsum+dolor+sit+amet+%3F%3C%2Fp%3E%0A%7D%40%0A%0A%40title%7B%0A++++%C3%87ok+g%C3%BCzel+i%C3%A7erik+++yerine+bu+gelecek+layout.blade.php%27de%0A%7D%40%0A%0A%40acontent%7B%0A++++yerine+bunlar+geliyor+layout.blade.php%27de%0A++++%3Cp%3ELorem+ipsum+dolor+sit+amet+felan+filan%3C%2Fp%3E%0A++++%3Cp%3ESonra+tekrar+lorem+ipsum+dolor+sit+amet+%3F%3C%2Fp%3E%0A%7D%40%0A'
   29     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%40%28%5Cw%2B%29%5Cs%2A%5C%7B%2Fms'
          3        SEND_VAL                                                 '%3C%3F+%5C%24%241+%3D+function%28%29%7B+%3F%3E'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !1, $7
   30     7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAL                                                 '%2F%7D%40%2Fs'
          9        SEND_VAL                                                 '%3C%3F+%7D%3B+%3F%3E'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !1, $9
   31    13        ECHO                                                     !1
   33    14        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fd3KqO%3A33%240'
         15        ASSIGN                                                   !2, ~11
   36    16        ECHO                                                     '%0A'
   37    17        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fd3KqO%3A37%241'
         18        ASSIGN                                                   !3, ~13
   42    19        ECHO                                                     '%0A'
   43    20        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fd3KqO%3A43%242'
         21        ASSIGN                                                   !4, ~15
   46    22        ECHO                                                     '%0A'
   47    23        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fd3KqO%3A47%243'
         24        ASSIGN                                                   !5, ~17
   52    25        ECHO                                                     '%3Chtml%3E%0A%3Chead%3E%0A++%3Ctitle%3E%3C%2Ftitle%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A'
   57    26        INIT_FCALL                                               'section'
         27        SEND_VAR                                                 !2
         28        DO_FCALL                                      0  $19     
         29        ECHO                                                     $19
   58    30        INIT_FCALL                                               'section'
         31        SEND_VAR                                                 !5
         32        DO_FCALL                                      0  $20     
         33        ECHO                                                     $20
   59    34        ECHO                                                     '%3Cfooter%3E'
         35        INIT_FCALL                                               'section'
         36        SEND_VAR                                                 !4
         37        DO_FCALL                                      0  $21     
         38        ECHO                                                     $21
         39        ECHO                                                     '%3C%2Ffooter%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   61    40      > RETURN                                                   1

Function section:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d3KqO
function name:  section
number of ops:  10
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ISSET_ISEMPTY_CV                                         !0
          2      > JMPZ                                                     ~1, ->7
          3    >   INIT_DYNAMIC_CALL                                        !0
          4        DO_FCALL                                      0  $2      
          5        QM_ASSIGN                                        ~3      $2
          6      > JMP                                                      ->8
          7    >   QM_ASSIGN                                        ~3      null
          8    > > RETURN                                                   ~3
    4     9*     > RETURN                                                   null

End of function section

Function %00%7Bclosure%7D%2Fin%2Fd3KqO%3A33%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d3KqO
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   ECHO                                                     '++++%C3%87ok+g%C3%BCzel+i%C3%A7erik+++yerine+bu+gelecek+layout.blade.php%27de%0A'
   35     1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fd3KqO%3A33%240

Function %00%7Bclosure%7D%2Fin%2Fd3KqO%3A37%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d3KqO
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   ECHO                                                     'yerine+bunlar+geliyor+layout.blade.php%27de%0A%3Cp%3ELorem+ipsum+dolor+sit+amet+felan+filan%3C%2Fp%3E%0A%3Cp%3ESonra+tekrar+lorem+ipsum+dolor+sit+amet+%3F%3C%2Fp%3E%0A'
   41     1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fd3KqO%3A37%241

Function %00%7Bclosure%7D%2Fin%2Fd3KqO%3A43%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d3KqO
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   44     0  E >   ECHO                                                     '++++%C3%87ok+g%C3%BCzel+i%C3%A7erik+++yerine+bu+gelecek+layout.blade.php%27de%0A'
   45     1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fd3KqO%3A43%242

Function %00%7Bclosure%7D%2Fin%2Fd3KqO%3A47%243:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d3KqO
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   48     0  E >   ECHO                                                     '++++yerine+bunlar+geliyor+layout.blade.php%27de%0A++++%3Cp%3ELorem+ipsum+dolor+sit+amet+felan+filan%3C%2Fp%3E%0A++++%3Cp%3ESonra+tekrar+lorem+ipsum+dolor+sit+amet+%3F%3C%2Fp%3E%0A'
   51     1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fd3KqO%3A47%243

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.49 ms | 1398 KiB | 18 Q