&g" /> &g">
Home Backend Development PHP Tutorial variable function的一个有关问题

variable function的一个有关问题

Jun 13, 2016 pm 01:42 PM
echo function quot undefined variable

variable function的一个问题
手册上说echo,print不是真正的函数所以不能应用variable function。但是我试了一下是可以的

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
$t='echo';
$t('123');

Copy after login



------解决方案--------------------
这个……很有用吗?我一般直接:echo "XXX-->>$X\n";或者echo("XXX");效果一样啊。
只要能输出就行啊。
看来平时还是忽略了很多细节啊,研讨……
------解决方案--------------------
楼主运行了吗。真的可以吗?
------解决方案--------------------
$t='echo';
$t('123');
Fatal error: Call to undefined function echo() ...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What does function mean? What does function mean? Aug 04, 2023 am 10:33 AM

Function means function. It is a reusable code block with specific functions. It is one of the basic components of a program. It can accept input parameters, perform specific operations, and return results. Its purpose is to encapsulate a reusable block of code. code to improve code reusability and maintainability.

TypeError: Cannot read property '$XXX' of undefined in Vue, how to deal with it? TypeError: Cannot read property '$XXX' of undefined in Vue, how to deal with it? Nov 25, 2023 pm 12:14 PM

If you often encounter the error message "TypeError: Cannotreadproperty'$XXX'ofundefined" when developing with Vue.js, how should you deal with it? This article explains the causes of this error and how to fix it. The cause of the problem is that when using Vue.js, we often use this to call methods of Vue components, such as: exportdefault{data()

Solution to PHP Notice: Undefined property: Solution to PHP Notice: Undefined property: Jun 22, 2023 pm 02:48 PM

When writing code in PHP, we may encounter the error message "Notice: Undefinedproperty". This error means that we are accessing an undefined property, usually because the property has not been initialized in the code. So, how to solve this problem? Here are a few possible solutions: Initialize properties This is the simplest way to solve this problem. Explicitly initializing a property in code ensures that it is defined before use. For example: class

Five selected Go language open source projects to take you to explore the technology world Five selected Go language open source projects to take you to explore the technology world Jan 30, 2024 am 09:08 AM

In today's era of rapid technological development, programming languages ​​are springing up like mushrooms after a rain. One of the languages ​​that has attracted much attention is the Go language, which is loved by many developers for its simplicity, efficiency, concurrency safety and other features. The Go language is known for its strong ecosystem with many excellent open source projects. This article will introduce five selected Go language open source projects and lead readers to explore the world of Go language open source projects. KubernetesKubernetes is an open source container orchestration engine for automated

Go language development essentials: 5 popular framework recommendations Go language development essentials: 5 popular framework recommendations Mar 24, 2024 pm 01:15 PM

&quot;Go Language Development Essentials: 5 Popular Framework Recommendations&quot; As a fast and efficient programming language, Go language is favored by more and more developers. In order to improve development efficiency and optimize code structure, many developers choose to use frameworks to quickly build applications. In the world of Go language, there are many excellent frameworks to choose from. This article will introduce 5 popular Go language frameworks and provide specific code examples to help readers better understand and use these frameworks. 1.GinGin is a lightweight web framework with fast

What do undefined and null mean? What do undefined and null mean? Nov 20, 2023 pm 02:39 PM

In JavaScript, both undefined and null represent the concept of "nothing": 1. undefined represents an uninitialized variable or a non-existent property. When a variable is declared but no value is assigned to it, the value of the variable is undefined , when accessing properties that do not exist in the object, the returned value is also undefined; 2. null represents an empty object reference. In some cases, the object reference can be set to null to release the memory it occupies.

When to use null and undefined When to use null and undefined Nov 13, 2023 pm 02:11 PM

Both null and undefined indicate a lack of value or an undefined state. Depending on the usage scenario, there are some guiding principles for choosing to use null or undefined: 1. When you need to clearly indicate that a variable is empty or invalid, you can use null; 2. When a variable has been declared but not yet assigned a value, it will be set to undefined by default; 3. When you need to check whether a variable is empty or undefined, use the strict equality operator "===" to determine whether the variable is null or undefined. .

Implementing distributed task scheduling using Golang's web framework Echo framework Implementing distributed task scheduling using Golang's web framework Echo framework Jun 24, 2023 am 11:49 AM

With the development of the Internet and the advancement of information technology, the era of big data has arrived, and fields such as data analysis and machine learning have also been widely used. In these fields, task scheduling is an inevitable problem. How to achieve efficient task scheduling is crucial to improving efficiency. In this article, we will introduce how to use Golang's web framework Echo framework to implement distributed task scheduling. 1. Introduction to the Echo framework Echo is a high-performance, scalable, lightweight GoWeb framework. It is based on HTTP

See all articles