PHP 7.0.6 Released

CONCAT

PHP code

<?php
/*
 * Concats string values string1 and string2
 * opcode number: 8
 */
echo "hello" "world";
?>

PHP opcodes

Function name: (null)

Compiled variables: none

line#op fetchextreturn operands
60 CONCAT   ~0 'hello','world'
 1 ECHO     ~0
72 RETURN     1

User Contributed Notes

shadiadiph at yahoo dot com
3 years ago
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
To Top