phpday 2027 - Call for Papers

Recolección de basura (Garbage Collection)

Tabla de contenidos

Esta sección explica los méritos del nuevo mecanismo de recolección de basura (también llamado GC, del término inglés Garbage Collection) disponible a partir de PHP 5.3.

+add a note

User Contributed Notes 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