« first day (1491 days earlier)      last day (3461 days later) » 

12:15 AM
Goodnight! =] Long live room11
 
12:58 AM
@Haney not sure when it broke, noticed yesterday when I was tried searching for a url and nothing was being returned, checked the cv-pls backlog and discovered its query was also now failing to return the proper results. I do the query and loop as efficient as I can to prevent unnecessary requests, but with as you pointed out the tags no longer work, but searching for the string cv-pls does, but now it contains any mention of the term and creates additional requests if used as search string.
Honestly I would love a simple chat API for basic searching via string, user, room, time and with partial or full match support. The rate limit and the fact that the transcript has to be parsed is a big hindrance in getting accurate and current data for the tool.
 
 
5 hours later…
5:48 AM
Morning
 
6:09 AM
/me grumbles
 
6:34 AM
0
A: Running multiple processes in parallel in php

Joe WatkinsIs it possible to run 20 threads simultaneously? Some hardware has more than 20 cores, in those cases, it is a no brainer. Where your hardware has less than 20 cores, it is still not a ridiculous amount of threads, given that the nature of the threads will mean they spend some time blocking wai...

I said a thing ...
 
@JoeWatkins why do you always come online in sync with crisis worsening :-P
 
what's occurring @DanLugg ?
 
nothing I just keep talking to her
 
talked to the misses yet ?
also, have you asked her (soul mate) how she's feeling ?? maybe she is scared of beards ...
 
6:50 AM
lol, well I'd explain the encounter but kinda difficult. I dont think there's beard fear.
And with the misses, no. Just average contempt and hatred.
hashtag
 
forgetting about soul mate, how the fuck do you find yourself in the position of buying a house with someone who you don't even like ? this is very confusing, I wouldn't enter such an agreement with anything less than someone I really love, because it doesn't make sense to do that ...
you need to talk to your misses, if you're going to attempt repair, or part ways, a conversation has to take place ...
 
Financial interest purely.
I'm working on the latter.
 
are you living in this house ?
 
Yea -- dear god, asdf better than mobile.
 
it's impossible to imagine what you can do next without that conversation having taken place ...
 
7:00 AM
anywho, yes. living in house. it was purely financial in orchestration. prior to this all, i was packing my shit.
 
it's good that she is not scared of beards ... but it doesn't answer all questions ...
 
lol, no, it doesn't. but that's part of the point.
i don't think her fear-o'-beards would change the situation.
 
if you were already packing, perhaps not ...
 
I came up with this analogy: if you were a prisoner, for ... long enough to forget about the world abroad. And suddenly, a photo album were thrown in front of you, with pictures of some happy people ... anywhere, really. Wouldn't that manifest incentive in you to try and break free?
 
it's probably best you don't roll out of a fire and land on some fresh hay ... I'm saying, if splitting was on the cards, then that should probably happen first before you pursue a new relationship ... and don't let "financial concerns" be the reason you ignore that advice, because it didn't work out this time very well did it ...
 
7:04 AM
^^ much agree. it has been on the cards, but my issue is that the vision of improvement has reared itself.
so it's no longer a matter of "Oh, this is all I got running for me because reasons", it's matter of "Oh, this is what I got running for me, and it sucks because <reasons>"
i think... that, I shouldn't have bothered to bring this up. the reality is that, this relationship, my current one, is completely and utterly fubar'd.
 
it's hard for me to imagine this happening to myself, I'm already with someone I consider my soul mate if such a thing exists, the kind of person you don't have to use words to communicate, the kind of person you miss when they are at work even after 10 years ... if someone better came along, I'm sure I wouldn't actually notice, because I'm not looking in the slightest ... bottom line does seem to be that the relationship is far enough gone that the most sensible thing to do is walk away ...
 
the deal had sealed itself, and it's just a matter of time. i've just made it quicker time.
 
it's extremely unhealthy to live with someone who you have contempt and hatred for ....
another week has gone by (I think) since we last had this conversation, things are not better ... you have a limited number of weeks on earth ...
 
7:18 AM
@JoeWatkins that's my thinking. this opportunity for "mutual happiness" is nothing more than a probable pipe-dream; whether or not it works out is really only a benefit.
I think I've resolved, with reasonable certainty, that my current relationship has run it's course.
whether or not I jump on some other bandwagon immediately is irrelevant to it's failure.
 
but very relevant to the next relationships success or failure ... jumping on bandwagons while on fire also dangerous, because fire ...
 
true fact.
but the fire of the previous has been out for a loooooooooooooooooooooooooooooooong ass time.
so i'm really just cold coal going into a different oven.
 
I can't agree, you obviously spend a lot of time thinking about this .... it's going to effect what you do next, if what you do next is level out, "work on yourself" as they say in every romantic movie ever, then your mindset will have changed, you should go in with a positive mindset ...
working on yourself doesn't mean there is anything wrong with yourself, it just means you need a chance to breath out, to let go of the past, it's not going to be very easy to do that overnight ... if it were me, I'd find myself somewhere to live (possibly near soul mate) on my own, I wouldn't start a relationship with anyone until my mindset had changed from someone who thinks relationships have an almost predetermined ability to last, to someone who thinks that it is my actions
that makes a relationship last or not ...
 
i wish i could explain the entirety or.. for that matter, gravity, of the situation.
 
perhaps that would change my opinion, but I doubt it ...
> that my current relationship has run it's course.
these are the words of someone with a negative view of relationships in general, aren't they ?
relationships have no course
 
7:30 AM
No, but if it did, it has run it.
 
it doesn't, as a matter of fact it doesn't ... don't go into the next relationship entertaining the idea that it has a course because it doesn't, is what I'm saying ...
 
^^^^^^^^^^^^^^^^^^^^ agree fully.
The issue is that the current relationship was predetermined to fail. based on prospecting alone.
 
explain that
 
she works in finance, and her strategies therein ooze into every element of her existence.
she basically bet that this was going to fail out.
and is reaping the emotional awards therefrom.
I KNEW THIS WOULDNT WORK OUT. YET HERE WE ARE.
the only thing this house has really brought to anyone's benefit is multiple beds.
 
she sounds quite horrible, but you have a bias opinion ... this is obviously quite troubling to you, but, remember that emotions are useless, as are words ... facta non verba ... let what you do next speak for you ... don't encourage any more negative conversation based on emotions, make good decisions based on facts, just like you do at work ...
 
7:38 AM
She isn't a horrible person. She's just a horrible person for me to have a relationship with.
We don't get along. Fire water. etc. etc.
 
sounds like decision is made ...
 
Pouring it out to other #baddecisions #possiblyjumpedthegunbutlifeisshort
bah, i think i dun goofed it.
oh, impatient alcohol, you devil.
yea, 50% i may have dun goofed.
78%.
84%
98%
 
8:23 AM
indeterminate%
 
8:34 AM
things deteriorated quickly there ...
 
9:00 AM
hi everyone
just had an issue
can we do "select * from table" with out using "*" in it.
 
 
2 hours later…
10:58 AM
Guys...Anyone there??
@Fabien Hi...
 
hehehe @yash so its actually quiet here today
 
@Gotalove Yup....Buddy
I think all are enjoying Weekend....
 
@yash can you get on fb?
or g+
?
 
ok
on fb...
 
11:29 AM
Hi php buddies how are you ?
 
11:46 AM
hello hi gud
I have Array ( [id] => 25 [created] => 1416050044 [percent_off] => [amount_off] => 1000
I want 25 value without sending data of key
hw can i retrieve
 
Do you mean you want to know the first value in an array without knowing the key?
 
262
Q: Get first key in a (possibly) associative array?

Alex SWhat's the best way to determine the first key in a possibly associative array? My first thought it to just foreach the array and then immediately breaking it, like this: foreach ($an_array as $key => $val) break; Thus having $key contain the first key, but this seems inefficient. Does anyone ...

 
i did try it before
ohk if it break we cant see the appropriate output
so for this
($an_array as $key => $val) echo $val
break;

will it effects
 
morning
 
11:57 AM
very gd mrng leri
 
@ASHISHRANJAN maybe you should read the answer and not the question
http://php.net/reset
$firstValue = reset($myArray); // false if array is empty
^ wtf at returning false, what if my array is [false, true, false, true]
 
@ASHISHRANJAN array_shift(array_slice($array, 0, 1)) :-)
 
Star Trek remastered is on Amazon Prime :) Finally get to start this series for the first time.
 
@Patrick reset is not meant for taking the first element of array.
If you mess with array pointers either you're doing something wrong or necessary optimization.
 
yes i think leri is ryt
 
12:10 PM
hey
 
12:40 PM
Leri
It doesn't work for me
 
@ASHISHRANJAN Define does not work
 
Array ( [id] => 25 [created] => 2014255 [ser_off] => [data_off] => 1000 [code] => AMC [object] => caps);
I've that data in server
I want to get 25
 
I want 1 million dollars. :D
 
I want 2 million dollars.
Then I can give Leri 1 million dollars.
 
Seriously, why do you want 25, because it's the first element, right?
 
12:45 PM
so do reset($array) if you deal with "real array" and not object array
and forget about that bug in the comment
 
@kodeart In fact, it's not a bug since it's function's documented flow.
@ASHISHRANJAN You have few choices there, either what I've already written or use array_values it'll give indexed array (in indexed array I mean array where keys starts with 0 and increments by one for the next element).
 
in case of object array it will take the first property (as intended behavior) or the first item in the array if it is an array (also an intended behavior)
so if you are sure that you will work on arrays always, do reset() and dont over complicate
 
@kodeart What is object array? :-)
 
object that implements Iterator interface
 
12:52 PM
actually Leri id is unique from where m getting these array if i want to read 25 I should write $array = array("id"=25); then i will get 25 I jst want to get 25 without taking help of id
is it possible?
 
@ASHISHRANJAN Sorry but that did not make sense to me. Could you rephrase that?
 
@Leri In Backend m adding some coupon 25 it will came back to me with the help id so it become primary for us


I have inbuild function

$arrData = Stripe_Coupon::retrieve(array(
"id" => 25,
));


with that m getting this array
print_r($arrData);

Array ( [id] => 25 [created] => 2014255 [ser_off] => [data_off] => 1000 [code] => AMC [object] => caps);

and now i just want it generate automatically whether i put 35 or 55 that should come in "id" => 35 if i add 35 and more...
 
Do you just mean

echo $arrData['id'];
 
morning
 
@ASHISHRANJAN, I strongly recommend you to read this article. Especially paragraph "The Golden Rule: Imagine You’re Trying To Answer The Question"
 
1:05 PM
MornHaa
 
morning, @PeeHaa
 
1:16 PM
I love this behavior in Ruby codepad.org/aEJRSdT4
is it possible we have the same in some future PHP version? :)
also that Notice 3v4l.org/FV8l8
 
@kodeart How is that different from php?
 
non existent array key throws Notice, as opposed to NIL in Ruby
 
Yeah no
Doing something stupid should be punished not allowed imho
 
define stupid
 
Trying to access things that do not exist
 
1:19 PM
...which might return NULL as special case
 
@kodeart No
 
ok just wondered :)
 
There will be now way to differentiate between NULL as defined and NULL as undefined
Which means going back to checking the index again which is what we already are doing
 
in that case one should do tons of isset($a['foo']) ? $a['foo'] : 'some default';
 
@kodeart I never do tons of those
 
1:22 PM
That Friday link got 80 clicks by the way :)
 
:D
 
@kodeart $foo = @$arr['bar'] :v
 
Not a single clicker was using IE
 
@BenjaminGruenbaum \o/
 
@Leri no thanks :)
 
@BenjaminGruenbaum is reb.bf your domain?
 
ThW
Morning
 
@bwoebi no, goo.gl short links provide analytics.
 
Mornign @ThW
 
@BenjaminGruenbaum oh okay … also, I even hadn't seen that message at all yesterday^^
 
1:26 PM
@kodeart The morale there was that what ruby does is the same as what I've written. If you don't like that snippet, you should not like ruby's behavior.
 
wtf is unpack() returning an 1-indexed array?!
 
@bwoebi :)
It's a whole meta discussion about the song.
 
0
Q: Reintroduce searching for tags in chat

PeeHaaWe always had the ability to search for tags in chat-search using the syntax tag:tag-name, but after the changes in chat search a while back this is no longer possible. I'm not sure when the changes were rolled out or with what goal (because in my experience it only made searching anything in ch...

 
@Leri I'm not sure how to read that snippet. what is " :v" part. But yes, if you don't like to suppress in php then I agree
 
Bas
Hey guys, is it allowed to post a question on Stackoverflow about a code pattern?
 
1:31 PM
@Bas What is a code pattern?
 
@kodeart It's not a part of php code. that's just a smile. :-)
 
Bas
Such as factory design, singleton, etc.
 
@BenjaminGruenbaum I get redirected to meta.stackexchange.com/questions/198392/… … what does this have to do with the song?
 
23 hours ago, by Haney
well... it seems as if something broke yesterday... I did what was supposed to be a "stealth" search change yesterday... Coincidence?
 
1:31 PM
@Leri lovely :)
 
@Danack I think it has been broken for longer then yesterday
3 pings sorry :D
@Bas Depends
 
If someone is willing to accept blame for breaking something....
 
:P
 
Bas
@PeeHaa It's a dynamic connection class i'm trying to create. But it's not really going great
 
@Bas Sounds like it is going to be a subjective or code review question
Which are not on-topic
 
Bas
1:33 PM
Alright :)
But the problem is, my code is'nt working just yet :P
 
@Bas Is the question long and/or can you handle critics? :)
 
Bas
The question is gonna be long, and yes ofcourse. I'm here to learn.
 
Can you minimize the question or chop it up?
 
Bas
I could explain you the basic concept what i am trying to do?
Yeah.
 
Shoot
 
Bas
1:35 PM
Do you want me to do this in an private chat?
 
Not saying I want to / will be able to answer, but ask away
@Bas Just do it in here. Nothing going on atm either way in here
Also note that if you want to share more than a couple of lines of code pastie or gist it @Bas
 
morning
 
Morning @RonniSkansing
 
I got the hangovers.. =[
 
Bas
I have an abstract Connection class, which includes the methods initialize and terminate. There is an DatabaseConnection class which extends the Connection class. In the construct method for this class you require a "Adapter" (the main class is also an abstract class). Childs of this "Adapter" class can be "PDO", "MySQLI", "SQLlite" ect. In every "Adapter" class there is an method which returns the object it should initialize. For example, for the MySQLI class this looks like this:

`public function getObject() {
Thats the first part, if you dont get it i'll try to explain it better :P
My english isnt that great :/
@RonniSkansing morning :P
 
1:40 PM
Why do you have a connection class in the first place?
 
Morning @Bas
 
Isn't PDO all you need?
 
Bas
No because i want to have multi connection types
I want to be able to create another child class of Connection
 
That is what PDO does
@Bas Why?
 
Bas
I guess practice.
So i want to be able to not only connect to a Database
But maybe to an... I dont even know. Its practice :P
 
1:42 PM
ok if for practice fine. But just keep in mind it is probably useless for any real use :)
Continue :-)
 
Bas
In the abstract Connection class there are 2 variables, $instance and $adapter. The $adapter variable represents a child class of the Adapter class. The $instance variable represents the connection where to connect to.
In the initialize() method i'm doing something like : $this->instance = $this->adapter->getObject(), Which then initiazes that object. (When its not already active)
that was part 2 :)
still makes sense?
 
i created a php file <?php phpinfo(); ?> using vim. but when accessing ti via web, it gives 500 error
 
@Bas Not sure yet
@JanakaRRajapaksha Check the error log
 
Bas
@PeeHaa What part?
 
Can you dump a minimal code example in a gist or something like that=
 
Bas
1:48 PM
Alright, one second :)
 
@BenjaminGruenbaum I am tempted to add a PHP challenge just to fuck with you guys meta.stackoverflow.com/questions/276688/… :P
 
I'd go for a php challenge, my PHP skills always need a brush up.
I don't like the language - that doesn't mean I don't value it.
 
I doubt the others in JS are open to PHP though :P
 
I liked F# challenge. I can get more familiar with functional programming paradigms.
 
Yeah was also looking at that one
 
Bas
1:57 PM
@PeeHaa codeshare.io/3bT7p This is my connection class
@Peehaa codeshare.io/Ou7Fd This is my DatabaseConnectino class
 
user1804599
initialize? y u no constructor
 
Bas
I liked it.
I was good at it.
I did it for me.
 
What is the use of getObject?
 
user1804599
@PeeHaa APL challenge!
 
Bas
I wanted to store my connection object in there
<?php


class MySQLAdapter extends Adapter{

public function getObject () {
return new mysqli(/*credentials*/'127.0.0.1');
}
}
But the problem is, i dont want to store my credentials in my Adapter class. Or MysqlAdapter class.
 
2:01 PM
You shouldn't
 
user1804599
getObject—the most descriptive function name ever.
 
You should inject it
Drop the getObject it is useless
 
user1646075
@rightføld Bring it
 
Just pass in the object and have it connect when needed
 
Bas
Can you show me how?
What do you mean by injecting it
 
user1804599
2:05 PM
Your design is so weird.
 
Bas
My plan was to use it something like this: $connection = new DatabaseConnection(''port", "dbname", ''username", "password", array(/*credentials*/), MySQLAdapter::getInstance());
I know.
 
@Bas Don't do that
 
Bas
How would you suggest it? Without having to create a seperate PdoConnection class which extends The DatabaseConncetion? Or is that just the best thing tod o?
 
You just introduced globals in your code
 
user1804599
class MySQLDatabaseConnection extends DatabaseConnection {
    private $mysqli;
    public function __construct(mysqli $mysqli) {
        $this->mysqli = $mysqli;
    }
}
 
user1804599
2:07 PM
Get rid of initialize() too—constructors are for initialisation.
 
Take it one step further don't extends some base connection class @Bas
 
user1804599
That too.
 
Bas
But what's wrong with "initializing" the variables inside the __construct method?
Without actually initializing the connection
 
user1804599
You prolly want something like gist.github.com/rightfold/1b0e5b0fdb2465a549bf.
 
public function **Result** execute
:P
If only ;)
 
user1804599
2:10 PM
I just noticed and removed that. :P
 
:D
 
user1804599
@Bas you can forget to call initialise.
 
user1804599
Basically an API that always requires you to do two calls in order is broken.
 
Bas
So it should only have an destruct method for closing the databasE?
 
user1804599
Not only because you can forget to call the second function, you also have an object in invalid state before that call has been made.
 
user1804599
2:11 PM
And objects that are in invalid state are bad objects.
 
Bas
So i should just destroy the whole objcet then?
 
user1804599
@Bas mysqli::__destruct should already do that.
 
user1804599
No need to do it manually.
 
user1804599
@Bas That happens automatically in PHP.
 
user1804599
PHP isn't C.
 
Bas
2:12 PM
but i'm not only working with mysqli
 
user1804599
wat
 
@Bas There are only very very few cases where you manually want to close a connection in php
 
user1804599
> return new mysqli(/*credentials*/'127.0.0.1');
 
user1804599
You just wrote this. How is that not working with mysqli?
 
Bas
I know, but what if i has a other class with SQLlite
Yeah, its one example :p
 
2:13 PM
Considering php's "share nothing"
 
Bas
Hmm.
@PeeHaa I like it though.
 
@Bas Why?
 
user1804599
You typically want to reduce mutability to the absolute minimum as that makes your code easier to reason about. initialize mutates.
 
Bas
I guess practice, it looks like the code is more 'universal"
 
2:15 PM
my php version is 5.4, it has only .dll extensions list
 
Bas
@rightføld But now we're totally off initializing the DatabaseConnection class
 
do i need to manually write .so extensions?
 
Bas
which was the plan though.
 
"Guessing" and saying "it looks like" might not the best words to base design decisions of
@JanakaRRajapaksha windows vs nix
 
user1804599
Though I don't see how a DatabaseConnection supertype is useful, unless you want to experience the eternal pain of writing portable SQL queries.
 
2:16 PM
^ which is a lie (portable queries that is)
 
@JanakaRRajapaksha dll's are the equivalent of .so extensions on windows.
 
If only every sql database would implement sql :(
 
Bas
@PeeHaa Well, i've seen it before. splitting functions over different classes
Which i was trying, because it looked pretty good and clear
 
Hello, can anyone help with laravel real quick?
 
Bas
@rightføld I dont even know :) Thats why i came to ask
@rightføld It looked very clear and dynamic for me.
 
2:19 PM
@Danack it doesnt have php_pdo.dll though, version is php 5.4
 
@JanakaRRajapaksha I haven't installed PHP on windows for quite a while, but I think you need to re-run the installation program, and tick the 'install pdo' option.
 
^ that
 
(Or use vagrant to use PHP in a sensible environment).
 
Also don't forget the specific pdo driver for your rdbms
@Bas What problem are you trying to solve with your class?
 
Bas
The object which should initialize.
 
2:21 PM
it is linux, i ordered from dediserve, that php.ini file not looks like the one i have in local pc
so little bit confuse
 
/brb food and beer
 
Bas
But is it possible? To instantiate the DatabaseConnection class with the credentials and Adapter as parameters?
 
@Bas You could just create a constructor in each of the child classes, and then when you want to create a particular version, just call the appropriate constructor?
 
Bas
But the child classes arent extending the DatabaseConnection right?
Or is'nt that needed?
 
user1804599
Remove design patterns from your brain, then try again.
 
ThW
2:29 PM
@Bas No they should implement it (as an interface)
 
Bas
@ThW But then i cant instantiate the Databaseconnection anymore?
 
ThW
@Bas No [php.net/interface], and if DatabaseConnection is an abstract class, you can not instantiate it, too.
 
Bas
@ThW Indeed, i know :) But how would you do it then?
If you want to instantiate it
 
This is really confusing imo =] maybe you could put a minimal example of the code in a pastie/pastebin etc
 
Bas
Extend it?
 
ThW
2:35 PM
You instantiate the concrete implementations, MySQLiDatabaseConnection, ...
 
Bas
why then? :P Thats not the thing i want.
 
ThW
You instantiate an concrete implementation, but all other objects use the interface and do not care about the implementation.
 
Bas
But i thought the code be more dynamic if i could "choose" which type of connection i wanted. In one instantitation
 
ThW
You can choose, by providing the instantiated DatabaseConnection implementation to you objects that need database access.
 
Bas
What do you mean?
 
2:42 PM
3v4l.org is errorings.......NOOOOOoooooo.......
@AndreaFaulds I read that and I've read the RFC, and that does not explain why 0.0 is safe to cast to int, and 10.0 isn't. In particular I've tried to follow the logic and it reads to be as:
$tests = ["0.0", "10.0"];

foreach ($tests as $test) {
    $a = $test;
    $aAsFloat = floatval($a);
    $b = intval($a);
    $c = floatval($b);

    if ($c === $aAsFloat) { echo "$a is safe to cast\n"; }
    else { echo "$a is NOT safe to cast\n"; }

    echo $a . "\n";
    echo $c . "\n";
}
Which outputs:
0.0 is safe to cast
0.0
0
10.0 is safe to cast
10.0
10
I can see that it's possible to make an argument that it should behave like that - but it's very unintuitive, and possibly not what people actually want. As I've said before, you really ought to provide a better rationale of why 10.0 isn't convertible to int without loss better.
/wall of text.
 
@Danack both 0.0 and 10.0 are safe to cast. just not if they're strings.
 
cpanel doesnt install pdo by defau;t
 
@NikiC That seems weird. So if someone makes a get request with a parameter that you want to convert to int, how do you get from the string variable in the get parameter to casting it to be an int safely?
 
@Danack You use the function as provided. Because you absolutely do not want to accept "42.0" as a valid GET parameter for an integral value.
 
Bas
anyways, thanks guy ;)
Should i just instantiate childs of database connectiont hen
 
2:53 PM
Like ?id=10.0. If that were accepted as an integer that would be a major WTF moment.
 
@NikiC I think I do. If I have an api in a library that I am calling internally then it's going to accept 42.0 as a float. If I change to calling that api through a httprequest on a different server, suddenly the 'same' api call will not work.
 
@Danack if you want to accept floats, use to_float...
if you want to accept ints, then '42.0' shouldn't be coming over the wire.
 
@NikiC No.....I've got that that is calling a function that is doing to_int and that apparently accepts (float)42.0 as a valid int. Changing it to a remote procedure call shouldn't change the behaviour...
 
If that happens somebody probably fucked up their JSON encoding. So this falls under the category "dealing with shitty APIs", which is always a pita
 
Yes, I know.....but I said it was going through GET params.....not through a JSON encoding.
 
3:00 PM
@Danack uh, so how does 42.0 end up in a get parameter? Or rather, why would you want to accept 42.0 as a get parameter in a place that requires an integer?
I don't get your requirements here, they don't seem realistic.
If you think that accepting "42.0" as a user ID or similar is okay, then I guess we just disagree there.
 
@NikiC I'm actually not convinced which behaviour is correct; What I am certain about is that the explanation of the conversion rules in the RFC is nowhere near convincing, and the fact that (float)10.0 can be cast to int, but (string)"10.0" can't be is going to be a real WTF for a lot of people.
> so how does 42.0 end up in a get parameter?
interface foo { function foo($bar); }
class Foo interface foo {
    function foo($bar) {
    	$barInt = to_int($bar);
    	...
    }
}

class RemoteFoo interface foo {
    function foo($bar) {
    	return $this->httpClient->call($remoteURL."?bar=$bar");
    }
}
> why would you want to accept 42.0 as a get parameter in a place that requires an integer?
I think I would want code to continue working transparently across a http call.
Yes, the code could be reworked to do a cast before calling the remote service.....which may be the correct way to enforce the int type.
 
@AndreaFaulds I feel like it might be reasonable to allow the plus sign. lolphp has made a good argument that all integer parsing routines in all languages accept it.
And on that note, it might be worthwhile to check out what other language allow and don't allow
 
2
 
3:20 PM
@Danack OMG that is awesome
 
They had many balls.
 
Question, when you query a database or whatever in PHP, do you interact with the database or the DBMS?
 
@Deep Er....wat?
 
Im writing -absolute crap- about php in shopping cart systems for homework
and I wanted to know how all this works
 
@Deep database, not DBMS
 
3:29 PM
I just need to finish this off basically pastebin.com/wnmJYndt
Is the DBMS for humans only then?
like phpmyadmin?
 
"-absolute crap-" - I don't disagree......You may know what your teacher wants better, but I would have thought that it would be more 'verb' based. e.g. "the web-server parses the users requests, and calls the scripting language". "The scripting language pulls the appropriate data from the database".
etc.
For your use case the words database and DBMS are pretty synonymous.
 
So should I just continue talking out my arse?
 
3:54 PM
hm
it seems my thread isn't very popular :(
 

« first day (1491 days earlier)      last day (3461 days later) »