« first day (272 days earlier)      last day (4901 days later) » 
00:00 - 14:0014:00 - 22:00

00:43
@Dan @Dan answered. Could someone else have a look to see if I didn't make an abvious mistake?
 
2 hours later…
02:46
@NikiC Ohhh, that's quite interesting
@nikic: can you provide me with some more information? What environment, what versions, etc? Something appears very broken with your crypt() function...
03:06
we'll talk tomorrow
 
3 hours later…
06:26
posted on July 15, 2011 by Stefan Koopmanschap

It's been a busy conference year for me. In the first half of 2011, I was away from home for (on average) one week every month. While I've really enjoyed all the conferences, it's been busy. A bit too busy. So for the rest of the year, I've decided to take it a bit slower. Basically, I'll be at 4 conferences, and that's it.

06:46
> Notice: Use of undefined constant undefined - assumed 'undefined' in /code/a13zkY on line 4
XD
Is it possible to "unset" an array index by setting it with a "special" value?
$arr['index']=undefined; isset($arr['index']); <- should be false
07:01
@ChristianSciberras , sure : $arr['index'] = null , this will make isset() return false , and array_key_exists() to return true
Hmm, strange. Not exactly what I wanted. I got it working by setting to null and filtering it out myself later on.
cannot you just use unset() ?!
not when you're just defining an array
07:26
@ChristianSciberras that doesnt make sense. either you want the key, then assign it with null or you dont want the key, then dont write it in the array.
@Gordon The array is merged with an earlier one.
and?
I need the specific feature of unsetting existing indexes.
unsetting an array index is done with unset
just like teresko said
christ
and I replied that I'm defining an array
07:28
to which i replied it makes no sense to unset an array index when you are just defining the array. just dont define the key then
function a(){
  return ['a'=>1,'b'=>2];
}

function b(){
  return a() + ['c'=>5]; // except that I want to unset 'b' here, therefore, I use ['c'=>5,'b'=>null] instead
}
sure, I could:

$a=a();
unset($a['b']);
return $a + ['c'=>5];

But it's more verbose for such a subtle operation.
print_r(
    array('a'=>1,'b'=>2) +
    array('c'=>5,'b'=>null)
);
Array
(
    [a] => 1
    [b] => 2
    [c] => 5
)
I'm using array_merge -_-
> The + operator returns the right-hand array appended to the left-hand array; for keys that exist in both arrays, the elements from the left-hand array will be used, and the matching elements from the right-hand array will be ignored.
@ChristianSciberras then dont give examples using +
That's hardly the point.
07:39
right, the point is you cannot remove an array key by assigning it null
which makes your argument about using unset being too verbose moot, because when there is a null in the array, you will have to filter it later anyways
But I'm filtering it once at the end, as opposed to doing it at each array decleration - well worthwhile.
You see, I have several such function declerations. But the filtering needs to be done once, at the end.
what are the real keys in the arrays?
what do the arrays represent?
is it just me, or @Christian always comes up with some broken piece of code and then tries to defend with "but you don't know how my code works, and i will not show you"
@teresko it's too complicated to reproduce by itself. You'd need several class files for one thing.
Plus, it ain't broken. It's adding a needed feature. That's all.
it sounds very broken to me
07:47
How can you say it's all broken when it's just merging two arrays?!
(and done several times in parallel for different purposes)
when its just merging some arrays, then i dont see why you cannot simply unset the keys in the end
because I know what I should unset at the time of setting the array, not at the end.
also, when you require an array with a specific structure, it might be better to make it into a type
@ChristianSciberras that doesnt make sense to me. sorry. i dont understand it.
@Gordon - never mind that. Here's what I'm doing;
I have some functions which return arrays of "options" read from different sources.
I needed some form of inheritance, so as to keep the declerations concise.
@ChristianSciberras huh?
07:52
I did this "inheritance" by merging an array with the one of a "parent" function.
It's similar to classes/oop really.
The problem is that I can't make this behavior work with oop.
I can't "build" a class dynamically for such a simple purpose.
In oop you would hide access of a parent property.
and that doesnt sound broken to you? Oo
example:

class Test {
public $name='';
}

class UnnamedTest extends Test {
protected $name='';
}

Anyway, I'm "hiding" access by unsetting the unneeded setting.
@Gordon The oop model, or the array one?
both :)
Well, if it were OOP, I'd say it ain't proper OOP (ie, it is "broken").
But the usecase is different.
yeah , which means that you still have not explained why do you need that strange behavior
08:00
@teresko :)
@ChristianSciberras overridden vars (or implementation inheritance) is the worst possible thing you can do with classes in php
Is this something like a() returning a base config for, say, a plugin and b() returns the config options for another plugin that unset the config for the first plugin? what is the end result really representing?
@ChristianSciberras I'd start by writing test, that way, anyone in here (and nearly anyone out there on so) can help you.
@Gordon Spot on. But it ain't about plugins.
@KamilTomšík I've had valid results. The question was a simple one and @teresko responded adequately. Don't see why I should complicate matters any more.
@KamilTomšík Agreed, thankfully, it ain't nothing of the sort.
I still think its broken.
you wouldnt remove a property of the supertype from a subtype. that would be wrong.
08:10
@ChristianSciberras okay
and you cannot change visibility from less strict to more strict, like in the example you gave
@Gordon - I did say it was not suited for OOP.
still, you tried to explain it with OOP, which gives me a hard time understanding it
and you still didnt explain what the final array represents
@Gordon - coz oop is the nearest thing I could think of.
The final array represents operations.
What operations the system is allowed to do.
@ChristianSciberras okay, but OOP != class inheritance
not even a little
08:16
@KamilTomšík What else would you compare inheritance to?
inheritance is inheritance, oop is not about inheritance
@KamilTomšík In a world of quadrilaterals you would explain what a circle looks like by tearing corners from a square :)
@ChristianSciberras the system or the current user?
@Gordon Both
@ChristianSciberras what?
08:20
@KamilTomšík what what?
@ChristianSciberras why would you restrict access of system?
@ChristianSciberras how is that related?
@Gordon Look, I can't get into any more details, but that's that. This is a sort of topdown ACL system based on different "sources".
It's not security related though.
I just imagine the error message: "the system determined that it is not allowed to do this operation. sorry."
@Gordon :D "Please try again later."
08:23
yeah, it sounds like an ACL, but it still sounds like the design needs some additional thought
08:39
Can't deny that.
Good morning folks
Morning :)
What experience do you guys have with server monitoring solutions? Any recommendations/advice?
what @KamilTomšík said
I must admit I've been trying to ignore it.
08:45
then write your own
morning
Hello @NikiC
@KamilTomšík Incidentally, I did (for the fun of it).
It's just that nagios is well suited for large systems.
Yesterday I've set up cacti. Wasn't impressed, at all :(
@ircmaxell Yep, the 5.4 issue is fixed now
trivia: echo 100...100 => ?
08:56
@Gordon 100. . .1 ?
@Gordon => 100.1 or 1000.1 not sure how php does that
0
Q: A problem about dot operator in PHP

SpawnCxyI thought I've known the String Operator . well enough untill I was asked a question about it today.The question looks quite simple: echo 100...100; At the first glance I thought it would make a syntax error.But when I ran the code and saw the result I was totally confused.The result is 100...

so yeah @NikiC is right
@ircmaxell For me it looks like my crypt() function does a DES instead of doing the hash type given by the salt. But I have no idea why.
@ircmaxell Ah, got it, I'm using 5.3.1 and sha256 and sha512 were added only in 5.3.2 ^^ Though I really wonder why it does the DES instead of giving me a *0. I mean, $5 isn't a valid DES salt, isn't it?
@Gordon Why did that question get so many downvotes?
btw: yesterday I saw question in local php thread about "what's encoding used for machi => iSpuxW8C" obviously, it's very hard question, if even solvable, anyone have idea? I'm sooo curious, because I really don't know :)
looks like base64, but it's not...
Guys, can you connect to multiple DBs with ODBC and run queries over DBs?
SELECT * FROM dbserver1.dbname.table,dbserver2.dbname.table
09:09
I doubt, but orm could do this
@NikiC because the OP originally asked echo "100...100" which was completely bogus of course
@Gordon Ah, okay
09:30
posted on July 15, 2011 by PHP Classes

The Plot to Kill PHP MySQL Extension By Manuel Lemos PHP core developers are planning to kill the PHP original MySQL extension. If you are using MySQL in your PHP applications for a long time, this may seriously affect you. Read this article to learn what this means in practice and what you can do about it.

@Feeds ... at last
@teresko Not sure if I'm exactly happy about it.
you wouldn't ..
@Feeds Wow, they really do it! Great news! And all just because I asked @salathe to deprecate __autoload
09:43
:)
@teresko Just because many abused or used it badly shouldn't mean those that did use it correctly should have to scrap their code.
@Gordon I only mentioned deprecating ext/mysql to troll the channel, but look at the result. I certainly wasn't expecting plans to be put in motion!
@salathe well, its about time to get rid of it. i mean, its not even enabled with php 5.3 by default, right?
@Christian if your code was written for php4 , then you should run it on php4
and with that, i'm done with everything PHP for a while.
09:45
and there is no harm in gradually deprecating it from the manual first
and then from the code
and if Johannes really gets to write that wrapper, everything's fine anyway
@teresko And what's that supposed to imply?
we're only really catching up with what everyone has been saying for years (don't use ext/mysql for new code)
@teresko It's only your opinion that makes a PHP 5 extension limited to PHP 4.
@Gordon Not sure what you meant by that...
@ChristianSciberras was wrong. sorry. its not enabled with php 5 because of the bundling issues, but re-enabled with 5.3 because of the switch to mysqlnd
methinks turning mysql off will let chaos loose.
Loads of current software rely on mysql. Ironically, even software that doesn't work on PHP 4 (@teresko).
09:51
i think PHP is coming at odds with its ease of programming.
its funny how the arguments pro ext/mysql are always the same :)
people have been developing using antipatterns because they could, enforcing good practices now is too little and too late. or too messy.
Now if we're talking for a long time deprecation, I'd agree with it.
same old argument "you cannot deprecate it. i use it" is same old argument.
But we're talking about a deprecation period of years.
09:52
@ChristianSciberras well, if you had read the article, then you would know that no one intents to remove it all of a sudden
it will be marked as deprecated in the manual first, which means it wont even raise E_DEPRECATED messages in your code
@Gordon I did read the article. It didn't mention any amount of time for depreciation.
well, of course it's going to be long-ish
> Well, as you may have read, the idea is not to kill this very popular PHP extension right now in the upcoming PHP 5.4.
@ChristianSciberras if you are running something that is outdated , then you should do it on a version which supported it
> In future versions, say PHP 5.5 or 5.6 common calls to functions like mysql_pconnect, mysql_query, etc.. will throw ugly E_DEPRECATED notices.
09:53
Yeah, but @UniqueKey I'd rather beat my head around current PHP limitations than disabling PHP features.
which means, it likely wont be removed before 5.7 and no one knows when that will come
@ChristianSciberras i don't think you can do much about limitations, though, not when people are developing bad code to get rid of first.
@Unique_Key :)
i still insist that doing so now is a fool's errand, PHP is famously known for making things work pretty much no matter how they're programmed.
@Unique_Key the main issue with the ext/mysql extension is that is horribly outdated. it doesnt support all the features of a current mysql db. it doesnt support prepared statements and its no longer actively developed. in fact, none of the core devs want to touch it. so its just fair to deprecate it. maybe move it to pecl or something for those die hards.
09:57
@Gordon - How outdated is it? Does existing features work?
@Gordon which furthers my point. why use proper methods to achieve the same tasks when the old ones that the average joe is used to just work?
a) horribly. b) which?
that's PHP's downside, in my opinion
@Unique_Key what do you mean by proper methods?
@Gordon My point is, if people want prepared statements, there are ample alternatives. If the mysql extension works "flawlessly", I don't think anyone actually cares if it's limited or not.
10:00
@Gordon for example, using PDO instead of the deprecated methods
(method as in methodology)
my point is, if there's a way to achieve any given task, no matter how outdated or poor, people WILL use it if they find it easy to do so
PHP has been offering far too many such ways of "doing it wrong" that it's deserved most of the flak it receives on poor coding practices
well, people used to drive cars with an intake of 20l leaded fuel on 100km, too.
> Although this MySQL extension is compatible with MySQL 4.1.0 and greater, it doesn't support the extra functionality that these versions provide. For that, use the MySQLi extension.
that alone justifies getting rid of it
@Christian so are you telling us that you think that mysql_* usage is part of "best practices" ? .. or even "remotely acceptable practices" for that matter
@teresko Let's admit it, anything without a hint of proper OOP isn't "remotely acceptable practice" to you :)
its not like the mysqli extension is identical to mysql. it has much more features. i really dont see why we should bundle two extensions for mysql when one of that is clearly inferior
why carry that extra baggage?
Deprecate it. Move it to PECL. If you still want to use if after 5.x get it from there
@Unique_Key i dont see how that is an argument for keeping it in the distibution?
Just to put some things straight here:
10:10
@Gordon it isn't. i'm just saying that it's a little late to get rid of deprecated, but unfortunately widely used features at this point in time
* ext/mysql isn't going to be dropped from the standard distribution in the near future. We currently are talking only about adding notes to the documentation. Everything else is just speculation.
* Even after it is removed from the standard distribution it will still be possible to use the extension. Either by getting it from PECL or by using a userland wrapper which defined the mysql functions around mysqli or PDO MySQL
it's going to cause a mess when probably half the web has to adapt, it's a huge step to take
@NikiC yeah, i tried to explain that above already :)
@NikiC Not if some random host decides they don't want to support 80-90% of DB-based applications out there for not installing a PECL extension.
And i have to add i to each mysql function? :(
10:12
of course, agreed, but even then old applications WILL have to be rewritten
@Robik oh noes! :P
@ChristianSciberras My code will grow by a lot of bytes! :(
i don't think it will be as easy as that :P
4 each page :D
Sid
Sid
Hi all, I'm working with integrating Doctrine 2 in Zend. I don't understand why the properties of Entities are set to private. Can somone pls explain why?
10:15
@Unique_Key imo the roadmap for deprecations as outlined is very sensible and gives plenty of time to adapt and even alternatives to use ext/mysql after it has been removed. imo, some legacy application somewhere on the web shouldnt bind core developer resources when they are much more needed in other parts of PHP.
@Gordon time will tell. for now, i'm preparing popcorn :)
@ChristianSciberras there is the idea of an adapter as well. It will provide the old API but execute on mysqli
@Gordon imo this problem should have been fixed from the start. This is the exact reason why wordpress does magic quotes by itself. Someone had a bright idea out of an even brighter one.
@Gordon I'm cool with that. :)
@ChristianSciberras "should have been fixed from the start" doesnt help anyone
you know, though, it's funny that i'm switching languages starting next week: imagine if i didn't touch PHP for a couple of years, and came back to find mysql deprecated for good. we'll resume this conversation right where we left it!
10:18
Leave ext/mysql alone! :)
Jul 4 at 14:19, by salathe
PHP sucks.
ext/MySQL sucks
7
@Robik Where's the -1 button? >:)
somebody star that. i'm not opinionated enough on the topic to do it myself :P
@ChristianSciberras Dunno :|
10:19
@Unique_Key people will tell you to install from PECL then. problem solved
@ChristianSciberras break the top div and jump backwards into it. then enter the pipe there :P
@UniqueKey It works! :D
@Gordon oddly enough, i never used PECL. not that it's exactly my case, i've never used raw SQL commands after learning them (there's usually an abstraction lib in between)
but yeah, i'm very curious to see how things will pan out
@UniqueKey You know what I do when @teresko seriously pisses me off?
I kick ass his comments. (erkie.github.com)
2
@ChristianSciberras i don't get pissed off at a CHAT, come on :P
but yeah, sounds fun
10:24
.. in other words , he ignores anything that does not fit into his world view ..
pewpewpew! there goes @teresko :P
@teresko Yeah, too bad there's the F5 key.
Sid
Sid
Hi all, I'm working with integrating Doctrine 2 in Zend. I don't understand why the properties of Entities are set to private. Can somone pls explain why?
@Sid im not that familiar with Doctrine but why dont you understand why they are private? What would you expect them to be?
@Gordon Is opening up access to properties good practice? I can see it useful in (unit)testing?
Eg: you extend a class and declare its private properties as public.
@ChristianSciberras as far as i'm aware, that's "doing it wrong" programmatically. in java, for example, extended classes can't access the paren't private properties at all (if i'm not mistaken)
10:30
@ChristianSciberras why would you want to do that? A unit-test tests the public interface of a class, so there isnt any need to change the visibility of properties.
*protected, I meant protected.
ah, protected. those should get inherited, which means you could write a getter or something
@Gordon when's the case for testing internals?
@ChristianSciberras there is no case for that
10:33
and you cannot extend a class and make its property from private to protected
Sid
Sid
@Gordon I've found the answer - stackoverflow.com/questions/4461296/…
class A { private $a = 1; }
class B extends A { protected $a = 2; }
print_r(new B);

B Object
(
    [a:protected] => 2
    [a:A:private] => 1
)
@Gordon I meant from protected to public.
@ChristianSciberras no use case for that. object state should be kept internal
ok, point taken.
what do you do when you need to ensure internal stuff is working as expected? I can think of proper debugging(with debugger) as well as DI
10:37
@ChristianSciberras test the public api
@UniqueKey what does "I'm switching languages" mean, you only use one at a time?
@ChristianSciberras Hey thanks!! That really helps against him
@NikiC What are you talking about? O.o
@nikic, that makes sense. Upgrade your php :-P
@ChristianSciberras The link ;)
10:58
link for upgrading php ?
2 hours ago, by NikiC
@ircmaxell Ah, got it, I'm using 5.3.1 and sha256 and sha512 were added only in 5.3.2 ^^ Though I really wonder why it does the DES instead of giving me a *0. I mean, $5 isn't a valid DES salt, isn't it?
And the library does say 5.3.3 as a minimum version (although I may downgrade that to 5.3.2 again, it's kind of an artifical limit due to one sort of un-necessary function call
ok, off to the train
later
@salathe sorry, i went out for lunch. no, i'm done with my PHP projects and i'm starting work as a C# developer next week, i probably won't even have time to look at PHP
it's a huge change for sure, i'll probably be too busy understanding what i'm doing :P
@Unique_Key okay, good luck with that. :)
thanks ^^
I've also recently "switched" to writing C# from PHP where I work.
11:13
luckily i'll be working with a senior developer, i hope i can learn a lot
@UniqueKey Let the type hinting be with you.
@salathe oh, great. any advice on the big changes ahead?
@Robik yeah, i'll probably get spoiled on that :D
enjoy it :)
@UniqueKey good luck as well :) (you'll need it ;)
heh, thanks @ChristianSciberras
11:15
Good luck @UniqueKey.
thanks @Robik :D
it's a good thing that i have two weeks off work in a while, i can take advantage of the free time to freshen up what little knowledge i have of that language
58 mins ago, by Robik
ext/MySQL sucks
+1 - @salathe's influence is too strong.
@ChristianSciberras It does.
Like many other things.
«So, is this PHP mysql extension deprecation really necessary. I don't think so, but that is just my opinion. At most it will avoid the need to maintain the documentation of multiple extensions to access MySQL databases.»
why do people write posts about subjects they clearly know little about?
I thought the same thing upon reading that.
Then again, I think that about most blog posts.
11:35
@salathe well, looking forward to the wiki.php.net/mysql page
Hi, I have a problem with my code, can anyone look into it? i am using codeigniter as framework:
    	function update_words($data){
		count($data[0]->id); // returns 1
		foreach($data as $w){
			$this->db->where('id', $w->id);
			if(!$this->db->update($this->table_name, $w)) // Updates every single entry!!
				return false;
		}
		return true;
	}
@Gordon lol
@UniqueKey no offense, but I wouldn't be surprised if you returned back to php after some time - or to any dynamic language.
@rickchristie if it wasnt for the "it's her job" I'd say it's reasonable advice ;)
@Gordon I saw slimar version but it with Give it to your mom.
11:42
That would be for those without a wife
@Robik yeah, probably the PG version of it. targeted at your age peer group ;)
@rickchristie or that! :)
:)
@mgPePe i dont understand the code
can i explain a specific part?
@mgPePe Maybe it updats every single entry because its inside a loop?
11:44
@mgPePe or at least, i think i know what it does but am not sure. can you dump the SQL query CI creates there?
Are you updating $this->table_name with an object?
I want that function to update all the words that are in the array. if 1 word, update 1 word. if 10 words, update all ten words.
@Gordon if you tell me how i will do it
@Robik yes, i update with an object that i get from previous $query->result();
@mgPePe hmm, not familiar with CI. can you try echo $this->db?
or try $this->db->update($this->table_name, $w, sprintf("id = %d", $w->id);
replace in the IF ?
@mgPePe yeah.. if update returns a boolean
11:53
okay, that did return TRUE
what does that mean?
what is the code supposed to do actually? do you want it to update every existing $w->id?
i want to update every entry in the array I am passing to the function
for example - if array has 3 objects, i want those three updated. If it has 1 object, i want only that object updated. for some reason though every single entry in the whole table gets updated to 1 single value
when i am trying it with 1-item array
what does this part do? sprintf("id = %d", $w->id)
it sets the where clause directly in the update and makes sure id is an integer
to print the query that will be generated try $this->db->flush_cache()
where should I put it? between which lines?
Before each new query?
12:04
@mgPePe ah sorry. it doesnt print the query. CI docs are stupid. But put it after the line that has the update()
seriously, how can anyone claim the CI docs are useful when they dont list proper method signatures
but the docs don't even have such a function for CI
you mean that it works, even if not listed in docs?
this returns NULL:

function update_words($data){
foreach($data as $w){
$q = $this->db->update($this->table_name, $w, sprintf("id = %d", $w->id));
dump( $this->db->flush_cache());
}
return true;
}
@mgPePe no. im just complaining :)
@mgPePe yeah, you dont need the dump(). just flush the cache to make sure you are not keeping the where clauses from the previous query. if i understand the docs correctly, the query object should reset the query object after an update, but its worth a try
aah, i see
ok let me try
so it would go something like:
function update_words($data){
foreach($data as $w){
$this->db->where('id', $w->id);
$q = $this->db->update($this->table_name, $w);
if(!$q){
return false;
}
$this->db->flush_cache();
}
return true;
}
yeah
I think it works now. Yet, it is still a mystery, why it would update all the 15,000 entries, even though my foreach loop has 1 item only
12:14
well, to me its mystery why anyone uses CI at all, but that's a different story ;)
CodeIgniter sucks.
@mgPePe if there was a way to print the query we could probably find the answer
I should call myself SucksBot :P
@Robik which framework does Not suck?
@mgPePe none :)
12:16
@mgPePe None | Your favorite | All.
@mgPePe all of them suck. there is just varying degree of suckage :)
so i guess the next question is - which sucks least? :)
the ones in php i found most popular were cakephp and CI and also theres django in python
1 min ago, by Robik
@mgPePe None | Your favorite | All.
that's all i know
@mgPePe yeah, and those suck most :)
12:18
Cake is a lie~!
"The cake is a lie" :) i like that
@Gordon and is there anything that sucks less?
have a look at sf2 or zeta components.. and even ZF1 isnt too shabby although it has some wtfs moments
google doesn't even give me a framework for term sf2 in the first 10 results :)
and zf is zend framework
12:21
aaah. i see
ive cursed it multiple times though so i'd put it somewhere in the middle
@mgPePe , i would recommend to taka a look at Sf2 and Lithium ( or Kohana ) , they all are flawed , but are the best of the bunch
And cake is... forget it :P
I'd stay away from Lithium
really ?
12:22
same people that did Cake
so out of all of you here, sf2 seems best choice?
yeah , and they forked kohana ... it looked promising from what i saw in presentations
best choice would be make one yourself
@mgPePe sf2 is widely considered as the current most sane framework if you are looking for a full stack framework
i am not that good
i am a beginner/mid programmer trying to push startup projects as fast as possible without dealing with lots of crap
if you make one , at least then you would understand, what you need in a framework , and even if you fail miserably, you will have some background to make an educated choice
12:24
@teresko i remember some well known qa guys saying at a conference that they removed half of the tests from a test suite in Lithium and it would still pass all test and report with full code coverage. so thats fishy :)
could be
@mgPePe well, you will have to learn lots of crap from the framework. its basically just exchanging one crap for the other :)
all php frameworks suck , its a matter of "which suck less"
I know i have to learn lots of crap, so i just want to pick a framework and get going to launch the project.
what i particular dislike about CI is their ugly codebase and their misnaming of concepts. Take that ActiveRecord object for instance. It isnt an ActiveRecord. It's a Query Builder.
12:26
(.*?) framework sucks. :)
@Gordon does it matter what they call it? as long is fetches and updates data, escapes stuff for security and has all the needed methods...
@mgPePe it absolutely matters. ActiveRecord is a well defined term. It's like saying Ship when you really mean Car.
> The echo() function outputs one or more strings.
I'm struggling to pull a joke about that.
But I. Just. Can't. :(
It's true.
@Robik no. its a language construct. not a function. otherwise you could not omit the brackets.
12:30
@Gordon I guess I didn't know the term then.
@Gordon Not according to W3schools ;) (there, I got the joke going)
@ChristianSciberras please stop linking to w3schools
I meant echo 'a', 'b';
@ChristianSciberras everyone knows w3schools -> w3fools.com
4
@teresko ok, ok sorry!
@Gordon .com
12:32
The real power of PHP comes from its functions. -_-
anyway, thanx @Gordon and @Robik!
@mgPePe Me?
This one is joke itself: The built-in $_GET function is used to collect values in a form with method="get".
12:37
I... can't... stop.. laughing...
13:22
@Robik did you stop yet?
Not yet
Okay, I'm done
Isn't it funny?
w3schools sucks.
if i have
$arr = array("Information" => 1, "Events" => 2);
foreach($arr as $a){
echo $a[1];
}

Why wont i get the number 1? or, if i do $a[0] why wont i get "Information"

what have i missed
ah.. $arr as $a => $n
00:00 - 14:0014:00 - 22:00

« first day (272 days earlier)      last day (4901 days later) »