<?php
$_PCONN['cnt']++;
if (function_exists('zend_thread_id')) {
    echo "thread ", zend_thread_id(), "\n";
} else {
    echo "main\n";
}

<?php
$_PCONN['cnt']++;
if (function_exists('zend_thread_id')) {
    echo "thread ", zend_thread_id(), "\n";
} else {
    echo "main\n";
}

exit(PCONN_SUCCESS);

Use the status constant for the return code
Use the status constant for the return code
