phpday 2027 - Call for Papers

垃圾回收

目录

本节介绍了新垃圾回收(也称为 GC)机制作为 PHP 5.3 一部分的优点。

+添加备注

用户贡献的备注 1 note

up
-1
toto at tata dot com
25 days ago
Which line of code will generate an HTML list of numbers from 1 to 10? (One correct answer)

for($i = 1; $i <= 10; $i++) { echo '<li>' . $i . '</li>'; }

/////////////////////////////////////////////////////////

What is the correct way to check if a URL parameter named 'id' is set? (One correct answer)

if(isset($_GET['id'])) { ... }

/////////////////////////////////////////////////////////

How to send a form field named 'email' to a PHP script using the POST method? (One correct answer)

<form method='post'><input type='text' name='email'></form>

/////////////////////////////////////////////////////////

What is the purpose of the `execute` method in a PDO statement?

To execute a SQL query

/////////////////////////////////////////////////////////

How do you change the color of an element with the id 'demo' in JavaScript? (One correct answer)

document.getElementById('demo').style.color = 'red'

/////////////////////////////////////////////////////////

How do you set an event listener to run a function named 'myFunction' when the cursor enters an element with the id 'myElement'? (One correct answer)

document.getElementById('myElement').addEventListener('mouseenter', myFunction)

/////////////////////////////////////////////////////////

What is the purpose of the `.then` method in JavaScript?

To handle the result of an asynchronous operation

/////////////////////////////////////////////////////////
To Top