Category Archives: PHP

What is Agile methodology? Examples, when to use it, advantages and disadvantages

Agile software development methodology is an process for developing software (like other software development methodologies – Waterfall model, V-Model, Iterative model etc.) However, Agile methodology differs significantly from other methodologies. In English, Agile means ‘ability to move quickly and easily’ and responding swiftly to change – this is … Continue reading

Posted in PHP | Tagged , | Leave a comment

What is singleton in php ?

Singleton initiates only at once A singleton is a particular kind of class that, as you correctly said, can be instantiated only once. First point: it isn’t a PHP related concept but an OOP concept. What “instantiated only once means?” … Continue reading

Posted in PHP | Leave a comment

What is token based authentication ?

Source: Explianed here.. The general concept behind a token-based authentication system is simple. Allow users to enter their username and password in order to obtain a token which allows them to fetch a specific resource – without using their username and … Continue reading

Posted in API, MysQl, PHP | Tagged , , | Leave a comment

what is exact use of arrow & scope resolution operation in php ?

Static methods doesn’t need to invoke any variables or dependencies it is always ready to execute by Class name itself & it always calls with scope resolution operator :: . on other hand arrow operator which have wider scope and … Continue reading

Posted in PHP | Leave a comment

Why @ character before a function call in php ?

Every php native functions have some return value or changes in actual values so return value type may be Error || Warning || Fatal Error so to prevent and run the remaining code without any interruption. in short @ character … Continue reading

Posted in PHP | Leave a comment

Check if current time is between two times, with the possibility of lapping days

function check_time($t1, $t2, $tn) { $t1 = +str_replace(“:”, “”, $t1); $t2 = +str_replace(“:”, “”, $t2); $tn = +str_replace(“:”, “”, $tn); if ($t2 >= $t1) { return $t1 <= $tn && $tn < $t2; } else { return ! ($t2 <= … Continue reading

Posted in PHP | Leave a comment

what is the main difference between patch and put request?

PUT : If user can update all or just a portion of the record, use PUT (user controls what gets updated) PUT /users/123/email new.email@example.org PATCH : If user can only update a partial record, say just an email address (application controls what can be … Continue reading

Posted in PHP | Leave a comment