3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current_language = 'en'; $snippets = array( 'backtotop' => array( 'en' => "Back to the top", 'fr' => "Retour vers le haut" ), 'info1' => array( 'en' => "As anyone who has met me will know, I wear many hats. I am a writer, translator, teacher and linguist and I am passionate about creativity, technology and languages. This is my personage web page that I created myself by writing it all by hand in HTML and Javascript, partly to see if I could and partly to have a platform to showcase projects I am currently working on. This includes both <a data-scroll href=\"#projects\">personal projects</a> and projects to which I have <a data-scroll href=\"#contrib\">contributed</a>.", 'fr' => "Comme toute personne qui a rencontré me saurai, je porte plusieurs chapeaux. Je suis un écrivain, traducteur, professeur et linguiste et je suis passionné par la créativité, la technologie et les langues. C'est ma page web de personnage que je me suis créé par écrit tout à la main en HTML et Javascript, en partie pour voir si je pouvais, et en partie à une plate-forme pour présenter les projets que je suis en train de travailler sur. Cela comprend des projets personnels de fois <a données défilement </a> et projets auxquels j'ai <a data-scroll href=\"#projects\">de données défilement contribué</a>." ), 'info2' => array( 'en' => "Feel free to have a look around. I will be updating this webpage on a regular basis to add more information and to make things generally shinier, so stay tuned.", 'fr' => "N'hésitez pas à jeter un coup d'oeil autour. Je mettrai à jour cette page régulièrement pour ajouter plus d'informations et pour rendre les choses plus brillants général, alors restez branchés." ) ); function get_snippet($tag) { return $snippets[$tag][$current_language]; }?><div class="section" id="about"> <h2>Who am I?</h2> <div class="backToTop"><a href="#" onclick="backToTop()"><?=get_snippet('backtotop');?></a></div> <div class="info_long"> <p><?=get_snippet('info1');?></p> <p><?=get_snippet('info2');?></p> </div></div>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IY3Ph
function name:  (null)
number of ops:  19
compiled vars:  !0 = $current_language, !1 = $snippets
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ASSIGN                                                   !0, 'en'
          1        ASSIGN                                                   !1, <array>
          2        ECHO                                                     '%3Cdiv+class%3D%22section%22+id%3D%22about%22%3E++++%3Ch2%3EWho+am+I%3F%3C%2Fh2%3E++++%3Cdiv+class%3D%22backToTop%22%3E%3Ca+href%3D%22%23%22+onclick%3D%22backToTop%28%29%22%3E'
          3        INIT_FCALL                                               'get_snippet'
          4        SEND_VAL                                                 'backtotop'
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
          7        ECHO                                                     '%3C%2Fa%3E%3C%2Fdiv%3E++++%3Cdiv+class%3D%22info_long%22%3E++++++++%3Cp%3E'
          8        INIT_FCALL                                               'get_snippet'
          9        SEND_VAL                                                 'info1'
         10        DO_FCALL                                      0  $5      
         11        ECHO                                                     $5
         12        ECHO                                                     '%3C%2Fp%3E++++++++%3Cp%3E'
         13        INIT_FCALL                                               'get_snippet'
         14        SEND_VAL                                                 'info2'
         15        DO_FCALL                                      0  $6      
         16        ECHO                                                     $6
         17        ECHO                                                     '%3C%2Fp%3E++++%3C%2Fdiv%3E%3C%2Fdiv%3E'
         18      > RETURN                                                   1

Function get_snippet:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IY3Ph
function name:  get_snippet
number of ops:  5
compiled vars:  !0 = $tag, !1 = $snippets, !2 = $current_language
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        FETCH_DIM_R                                      ~3      !1, !0
          2        FETCH_DIM_R                                      ~4      ~3, !2
          3      > RETURN                                                   ~4
          4*     > RETURN                                                   null

End of function get_snippet

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.07 ms | 1390 KiB | 16 Q