add cli checks to Php code
[roojs1] / undefined