PHP Velho Oeste 2024

ADD_VAR

PHP code

<?php
/*
 * add contents of variable in value2 to string value1 and store in result
 * opcode number: 56
 */
echo "hello$a world";
?>

PHP opcodes

Function name: (null)

Compiled variables: !0=$a

line#op fetchextreturn operands
60 ADD_STRING   ~0 'hello'
 1 ADD_VAR   ~0 ~0,!0
 2 ADD_STRING   ~0 ~0,'+world'
 3 ECHO     ~0
74 RETURN     1
add a note add a note

User Contributed Notes 1 note

up
1
fengdingbo at gmail dot com
10 years ago
<?php
$abc
= 'ok';
$php = 'php';
echo
"$php";
?>
qiufeng@ubuntu:~/tmp/php$ php -dvld.active=1 test.php
Finding entry points
Branch analysis from position: 0
Return found
filename:       /home/qiufeng/tmp/php/test.php
function name:  (null)
number of ops:  4
compiled vars:  !0 = $abc, !1 = $php
line     # *  op                           fetch          ext  return  operands
---------------------------------------------------------------------------------
   2     0  >   ASSIGN                                                   !0, 'ok'
   3     1      ASSIGN                                                   !1, 'php'
   4     2      ECHO                                                     !1
   6     3    > RETURN                                                   1

branch: #  0; line:     2-    6; sop:     0; eop:     3
path #1: 0,
To Top