文字

CONCAT

PHP code

<?php

echo  "hello"  "world" ;
?>

PHP opcodes

Function name: (null)

Compiled variables: none

line # op fetch ext return operands
6 0 CONCAT     ~0 'hello','world'
  1 ECHO       ~0
7 2 RETURN       1

用户评论:

[#1] shadiadiph at yahoo dot com [2012-06-07 15:37:59]

Concat . is a very useful tool in php while creating long strings or creating a set of data for example;

<?php
// GIVE THE STRING A NAME
$mystring="";

// NOW USE CONCAT . TO BUILD THE STRING

$mystring.="hello,";
$mystring.="world";

echo 
$mystring;
?>


output will be
hello,world

上一篇: 下一篇: