Skip to content

Tag: php

PHP round() bug with round(908.5449, 2, PHP_ROUND_HALF_UP) = 908.54?

I am currently investing a rounding problem in PHP. I’ve tested it here https://3v4l.org/NpRPp and it seems to be the same, since ever. But is this correct behaviour? Because i expected the following. Can someone tell if this behaviour is intended, and if so, how to solve it properly for every possible …

How to establish PHP PDO connection with pooling

I want to connect a Postgres database with pooling:true. Can we do it with PHP new PDO option? If not are there any reliable options? I want to pass the below parameters(similar) while establishing the connection: Pooling=true;Minimum Pool Size = 2;Internal Command Timeout = 0;Command Timeout = 0; I cannot fi…

MessageBird sms not sending (php)

I have been trying to send SMS messages with PHP using MessageBird. Currently I’m getting no error messages but I’m not receiving the messages on my phone, but I can see my free SMS credits being deducted. I was wondering if there was anything I was missing? Answer One option for debugging would b…

How to know if a date/time string contain day or not in php?

I want to check if a date/time string contains a day or not. I used the date_parse() function but it automatically adds day => 1 if it doesn’t find any day. So I couldn’t know if a string contains a day or not. For example How to know if this string contains a day or not? Answer I think you

Laravel question, How to use _GET on Blade

I have a question that I cant solve at this moment. I have and URL like this: https://www.example.com/schedule/2020-02-26 i put the date on the URL with the next function: In this example $datevar is equal to “2020-02-26” My question is, How can I show the $datevar in my blade? Im trying with {{$d…

second condition not being met when condition is called [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year. Improve this question The below is the basics of my activation code, the user is sent a link when …