PHP 8.5.0 Alpha 4 available for testing

Voting

: max(five, zero)?
(Example: nine)

The Note You're Voting On

Sander Backus
11 years ago
Note that when you reset $sem_identifier the semaphore won't block anymore!

This code does NOT work:
$key = ftok(__FILE__,'m');
$a = sem_get($key);
sem_acquire($a);
$a = false;

while this one does:

$key = ftok(__FILE__,'m');
$a = sem_get($key);
sem_acquire($a);
//$a = false;

So: use unique var names for your identifier!

<< Back to user notes page

To Top