Home php how to use assert php

how to use assert php




I do not understand how it works,

assert (true == false);
echo 'hello!';

I do not change, constantly gives true,

https://www.php.net/manual/ru/function .assert.php

Answer 1

1: Generates and executes the code (development mode)
0: Generates code, but jumps over it during execution
-1: Does not generate code (operating mode)

changed in the OpenServer Zend.assertions C -1 config on 1 and everything worked

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions