« first day (1122 days earlier)      last day (3826 days later) » 

night all
 
night @PornKing
 
gn
 
@JoeWatkins why?
 
12:24 AM
Helo.
hello*
@ircmaxell Long-time no see.
 
@ircmaxell Felipe mentioned yesterday it'd be nice to have a gdb like php debugger, so we started writing last night ...
 
@JoeWatkins Can't you just make bindings for gdb?
 
dunno how ...
 
Anyone here advanced with ZF2?
Am I a ghost... I feel like no one has replied to anything I've said. :(
 
@TimothyPerez Every body sleeping maybe ...
 
12:34 AM
@HamZa Thanks for replying... I was beginning to think no one could see my text.
Was trying to get a second opinion as to ZF2's whole Module/Service based architecture.
 
@TimothyPerez sorry can't help
 
@HamZa no worries.
 
12:49 AM
Hey guys what's the difference between != and !==? If you have $a = "1000"; and $b = "+1000", and you do "if($a != $b) echo "1";"
 
@TimothyPerez try again in 4-8 hours ^_^
 
@reikyoushin thanks
 
but if I do !== echo 1, it shows. Why is that?
 
@user2738336 !== checks the data type too
so trying if(1==='1') will result in false yet if(1=='1') will result in true
 
The === will ignore the datatype right?
 
12:52 AM
@user2738336 the other way around.. it will compare the values strictly according to the datatype
 
Ah okay I got it now! thank you, it was confusing first reading it in my book
 
@user2738336 on your example, either != or !== will result in to false since the two strings does not match
> $a = "1000"; and $b = "+1000"
 
@reikyoushin Wouldn't the +1000 be converted into numbers though? There by making 1000 = 1000? I read that any strings composed entirely of numbers will be converted to numbers whenever compared with a number.
The value of b is 1000 since it's positive 1000, and a is a positive 100 too
@reikyoushin snap didn't realise it was comparing in their present operand type! My bad thank you again
 
1:18 AM
@user2738336 where did you see that? i thought what it meant was $b = +1000; or I may be wrong.. better ask the others though
and why do you need + if 1000 is enough to indicate it is positive?
@user2738336 you can test em out.. 3v4l.org/CiBO5
weird, why is PHP_EOL undefined? ------^
 
 
1 hour later…
2:31 AM
good morning room 11
 
mornin'
 
hello, anyone here?
wonder if anyone could help, I need to transform "index.php?language=spain" to "index.php?country=spain"
preferably trough htaccess... Any ideas?
('cause the language parameter is in a encrypted file)
so I can't simply change it to country
 
2:56 AM
@LucasB why is the language file encrypted?
that's an odd file to choose to encrypt
 
it's whmcs
it's mostly encrypted
There's no easy way to do it?
 
RewriteRule ^index\.php\?language=(.+)$ /index.php?country=$1 you can try that, I don't use mod_rewrite anymore as I use Nginx, but give it a try.
 
thanks, no luck though :/
but it's good to have an idea on how to do it
here's my try lol
RewriteRule ^(.*)?language=(.+)$ (.*)?country=$1
still won't work, but is the (.*) right?
it's meant to be sitewide, not only index.php you know
 
3:28 AM
@LucasB Try RewriteRule ^(.*)?language=(.+)$ $1?country=$2
 
Still nothing
This is the URL output:

website.com/index?country=mexico
It won't change the language like that, only with ?language=mexico
 
3:56 AM
Hello Everyone
 
hello
 
Is there a way I can directly search for a value within an array of objects without putting it into loop
 
you can use array_search
 
Eg
Array
(
[1] => UserRole Object
(
[Id:protected] => 9
[UserId:protected] => 140
[RoleId:protected] => 5
)

[1] => UserRole Object
(
[Id:protected] => 9
[UserId:protected] => 140
[RoleId:protected] => 5
)
[m_boolAllowDifferentialUpdate:protected] =>
)
 
What value are you wanting to search for by.
 
4:00 AM
right now i am doing it this way

foreach( $objUserRoles as $objUserRole ) {
if( Role::ROLE_MASTER == $objUserRole->getRoleId() ) {
Now say I have an array of 200 users
i need to look in all of then checking If Condition
 
you can do a array_filter
$matches = array_filter($objUserRoles, function ($a) { return Role::ROLE_MASTER == $a->getRoleId(); });
This will give you an array of UserRole Objects where the condition matches
 
4:15 AM
Great, Thats It works
 
4:39 AM
Hay could u please tell me how does it work
function ($a) { return Role::ROLE_MASTER == $a->getRoleId();
withen array_filter()
 
I'm trying to show a message if the URL contains ?logout on the end, does anyone knows a good tutorial about it?
for example, if URL is mysite.com?logout, show

<div class="closable-div">You have succesfully logged out.</div>
 
@ShowketBhat ... it is an anonymous function
@LucasB you want to inspect the value of $_SERVER["REQUEST_URI"] and test it against your url pattern. If they match show the message
 
4:56 AM
@Orangepill thanks for the heads up
 
It seems what you are trying to do is to write a Router. Might be a good idea to look at some of the existing implementations for some inspiration like the router for ZF2 or symfony
 
me?
 
5:12 AM
@Orangepill I got it is anonymous function, but i am confused about the value in that function $a.. Could u please xplain me the flow with it ..
 
The value of $a is going to to be each of elements in the array.
 
But How ?
with out assigning anything to $a
 
user652649
6:10 AM
morning
 
6:23 AM
hi @Wes
 
user652649
we meet again, mr ashish
 
user652649
[morning]
 
morning
@DaveRandom lifehacker.com/… =o\
 
user652649
7:06 AM
@cspray sorry for ping but you may have an answer for me, i checked the changelog but i didn't find nothing

since when it's allowed to override constructors freely, like

class A { function __construct(C $c){} }
class B extends A { function __construct(D $d){} }

where C and D are two separate different classes

iirc php throwed the LSP error also on constructors, is this correct? now it doesn't anymore though
 
vs7
7:47 AM
Hi , I'm working on classes based system but i need to encrypt them with ionCube , but the problem is i need to encrypt only function not whole class , so i put function in separate file say functions.php but when i try to include it in class it gave an fetal error
 
8:11 AM
morning
 
8:22 AM
@vs7 lolwut
 
vs7
8:35 AM
@HamZa Hi
morning
 
morning
 
vs7
ya i need your help you you can see
i list my problem above
 
meh, I don't see why you have classes and functions apart. You choose one concept, don't mix them up. Well that's my opinion
And why in the world would you like to encrypt your code ?
 
vs7
I dont want any body see my logic control
soo i want to encrypt all function
 
@vs7 it's server side so the client won't see it. And if you want to sell it, then just provide a service instead of providing the code
 
vs7
8:38 AM
ya i want to sell it , its a wordpress plugin
so i need to encrypt it
 
@vs7 I thought that ioncube requires to install a php extension or something like that. Who would install it for a wordpress plugin ?
 
vs7
actually my client needs it
so i dono have an option ...
and ya you are right ionCube need to be install on server
 
Morning
 
I never understand why people bother to encrypt things like plugins. I mean yeah maybe a CMS since it's so complex and it would be hard to replicate it, but a plugin and for Wordpress? I'm sure whatever it being coded any good developer would be able to make it easily. Encrypting just makes it crippleware for the purchaser.
 
^ that
 
vs7
ya i know
but how i can make my client understand
 
@vs7 is your client technical ?
 
vs7
nops she is from marketing background ..
that's the main problem
 
Tell her : you go to the supermarket and want to buy food. Would you buy a product which has no description of it's ingredients ?
Also, no one would like to install additional extensions for a mere wordpress plugin
 
vs7
@HamZa Actually i tried a lot to make her understand but she don't want to understand and gave me warning to cancel my project ...
So there is no option to include function from a separate file ...
 
8:52 AM
@vs7 my condolences
 
@vs7 wait so the client wants it encrypted or you want it?
 
It seems like the client would sell it to her clients ?
 
vs7
@crypticツ hm
@HamZa yup i think so
 
@vs7 hm?
 
.
 
8:55 AM
@vs7 what does the plugin do if I may ask you ?
 
vs7
@crypticツ hm, i want to encrypt my Class (only function)
.
.
I already buy a ionCube encrypt tool ... but i don't want to encrypt the whole class
 
does anyone know wordpress here?
i have one doubt
 
vs7
@404NotFound
yup ...
 
@vs7 i m learning wordpress now... from where i can uninstall my plugin
 
404 what doubt
 
vs7
8:59 AM
you can delete directory from ftp by following path wp-content/plugins/pluginname
 
dashboard >> plugin
 
so uninstall and delete both are same here?
 
vs7
or you can first deactivate plugin then there will be delete option appear on plugin page
yup
 
ohhh thanks
 
they are not same
 
vs7
9:00 AM
any time
:)
 
@pr1nc3 ??
 
404 yes ?
 
what is diff?
i m really confused
 
clicking on uninstall call this hook register_ininstall_hook
uninstall*
while simply deleting plugin via ftp will not call this hook
 
vs7
@404NotFound if you want to deactivate the plugin you can deactivate and keep it with you .. and if you want to complete remove then you need to delete it thats the only diff..
 
9:02 AM
in some cases you need to run this hook for example to delete certain d tables to reset some settings etc
 
in my plugin i have uninstall.php.. when it will gets call?
 
Hello, I'm using cURL to get some data from Amazon. on my local server it works fine but on online server it gives me "couldn't connect to host"

any idea..? ho can i resolve it
 
vs7
@404NotFound @pr1nc3 is right some time there are database table which are deleted if you delete from wp-admin .. but if you directly delete from ftp your wordpress still contain the tables
 
9:04 AM
Hello, I'm using cURL to get some data from Amazon. on my local server it works fine but on online server it gives me "couldn't connect to host"

any idea..? ho can i resolve it
 
vs7
do you have curl extension on server?
@Prakash
 
Yes
my earlier project working fine
@vs7 let me do that.
@vs7 ??
 
Who would have imagined that room 11 would turn into room wordpress ...
 
@HamZa I'll take care of that...
 
haha
 
vs7
9:13 AM
@Prakash which link you are requesting from amazon ?
 
@vs7 here it is : "http://ec2-54-243-214-204.compute-1.amazonaws.com:8080/majestic/search?q=$q&f=j‌​son&start=$start&num=$num"
 
please take Wordpress discussions to the appropriate room
 
cryptic pushing us out of the door o_0
 
vs7
@crypticツ i just answer the queries ... and may i know can we use include in classes
?
 
9:16 AM
@vs7 is this an ultimatum? If I don't answer you will unleash your wrath?
 
@vs7 I get the json from this amazon link... working on local server but error on online server
 
yes you can use include, it's just not recommended as it's bad practice afaik.
 
vs7
but the it gave me fetal error
 
@vs7 ..?
 
@vs7 how about posting the actual error
 
vs7
9:21 AM
T_String can't use include
 
@vs7 what version of PHP are you using? Error message sure have gotten a lot smaller with these new ones...
 
vs7
5.3
 
that was sarcasm
 
vs7
i also used it on 5.4
same error
 
>.< *facepalm*
post your FULL error message, you can edit out sensitive portions of path.
 
9:24 AM
@crypticツ my condolences
@crypticツ Sometimes you just need to take the route of @tereško -- ignore user Y
 
Jesus .. @vs7 - read this - all your answers are there. seriously
 
@HamZa activating tiny avatar powers!
vampire vanquished!
 
@crypticツ include itself is not bad practice but not using an Autoloader for classes, or using different classes with the same name, ...
meaning about all of the reasons you have an include inside a class
 
vs7
@ThomasWeinert than why should i got an fetal errror
 
@crypticツ texts are giving me a feeling like am in a fantasy room
 
9:28 AM
Frustrated
 
@ThomasWeinert apart from an autoloader you really should not be using includes within a class, and to prevent naming conflicts you have namespaces for that.
 
......
 
@vs7 lacking a brain? Sorry, couldn't resist :)
 
vs7
@vascowhite ?
 
@crypticツ indeed
 
9:29 AM
@vs7 'Fetal' should be 'Fatal'.
 
btw :p I have more interesting issue then this awful debugging task :p
 
vascowhite lacking a brain ?
@vascowhite
 
@pr1nc3 lolwut
 
(no real use-case, but my curiosity): imagine we have arrays: $keys = [1, '2', 3]; and $values = ['foo', 'bar', 'baz']; - and we want to combine them in a result like array_combine() - but with keys type saving :p
 
@pr1nc3 nevermind
 
9:31 AM
I have some ideas, but they are half-working :p
 
@vs7 to quote cyptic "post your FULL error message, you can edit out sensitive portions of path."
 
if a person makinga typo is brainless then you are a bigger fool @vascowhite
 
@AlmaDo That was asked a while back on the main site, right :)
 
Can we have a helper?
 
@HamZa where?
 
9:32 AM
haha
 
because uneducated / illiterate are better words to call such person
 
@HamZa ah got that. and I answered with a reason but not with solution
 
sorry cant resist @vascowhite
 
A joke is something spoken, written, or done with humorous intention. Jokes may have many different forms, e.g., a single word or a gesture (considered in a particular context), a question-answer, or a whole short story. The word "joke" has , including wisecrack, gag, prank, quip, jape and jest. To achieve their end, jokes may employ irony, sarcasm, word play and other devices. Jokes may have a punch line, i.e., an ending to make it humorous. A practical joke or prank differs from a spoken joke in that the major component of the humour is physical rather than verbal (for example placin...
 
@HamZa - but - no, it isn't about main site :p now I'm just curious :p
 
vs7
9:33 AM
okay guys im leaving now ... bye tc, and thanks for discussion
 
@vs7 bye
 
@vs7 bye thanks for enlightening us
 
@pr1nc3 Typos does not indicate smartness or brains
It only indicates laziness.
(Repeated typos that is, the occasional typo means nothing)
 
exactly so a person shouldnt be called "brainless" for that
 
morning
 
9:38 AM
@HamZa he-he, get it now :p
 
even it was spelling mistake.
 
@pr1nc3 It was a joke...
 
hi, @JoeWatkins
 
you cant call a person brainless for a spelling mistake, PLEASE EASE YOUR FRUSTRATION ELSEWHERE
 
@pr1nc3 Now you're getting annoying. Learn to take a joke, or shut up about it. Seriously.
 
9:40 AM
madara who df r you ?
and joke was very funny rofl
 
@pr1nc3 Madara Uchiha, legendary ancestor of the hidden leaf village, able to cut mountains in half.
 
@pr1nc3 damn take it easy
 
oh I am in fantasy room wasnt worng
:D
@HamZa okey sir
 
@pr1nc3 Hearing that from a wordpress guru is ironic
 
haha
 
9:43 AM
so pr1nc3 is wordpress guru
 
^ lolz
sorry, I just hate Wordpress =o(
 
Sarcasm is "a sharp, bitter, or cutting expression or remark; a bitter gibe or taunt." Sarcasm may employ ambivalence, although sarcasm is not necessarily ironic. "The distinctive quality of sarcasm is present in the spoken word and manifested chiefly by vocal inflections". Any comment could be considered sarcastic in the correct context, such as "The Nazis REALLY brought good to the world". Origin of the term The word comes from the Greek σαρκασμός (sarkasmos) which is taken from the word σαρκάζειν meaning "to tear flesh, bite the lip in rage, sneer". It is first recorded in En...
@web2students.com have a look here
@crypticツ seriously your statement was heartbreaking
 
^ sarcasm
 
my wordpress blog is hacked 2 times, is this because it's famous or it's because it's vulnerable or both?
 
^ sarcasm
 
9:46 AM
mornin guys
 
hi, @DamienOvereem
 
wordpress strip in public @web2students.com . thats y
 
I've never worked with wordpress
 
@HamZa what was that ?
 
9:48 AM
@AlmaDo heh.. seems we answered the same question at pretty much exactly the same time with pretty much exactly the same content ;p
why does that happen so often .. guess great minds think alike ;p
 
@DamienOvereem :p
 
@pr1nc3 a list of WP exploits
 
@DamienOvereem *flags them as dupe accounts* =oP
 
@DamienOvereem more of that, I've even answered occasionally on comment to your answer :p
 
how can i use/misuse them @HamZa ?
 
9:50 AM
@pr1nc3 now you want me to teach you p0wn wordpress websites ?
 
nah just want to know what exploits are
 
I haven't answered many questions lately. Just felt like doing a few today
 
ok, so i think it's better to have my personal code that is insecure but no one knows my coding
 
@DamienOvereem you mean repfarming
@pr1nc3 Should I google it ?
 
Pretty amazing. Managed to cancel a subscription from a different email. :P
 
9:52 AM
i thought you know
@HamZa
 
@pr1nc3 pfffft, don't make me laugh
 
: D
 
@HamZa why repfarming. I actually try to give somewhat solid answers. When applicable. I actually don't need more rep. ( where was that remark coming from? ..)
But just for that.. i +1 alma's answer .. more food for the farm!
 
nevermind i will do that later @HamZa
 
@DamienOvereem hehe, no it was just that I wanted to repfarm this weekend but was distracted by a regex game xD
 
9:53 AM
@DamienOvereem I'm doing repfarming as well as improving my skills here. And I'm not going to lie that it is not so. I know about myself - that is not only repfarming - but - yes, also repfarming
 
@HamZa I know man :) I actually got all the way to Newbie rank, at that point i had a headache..
I only repfarmed up to 3000k so I could actually contribute on closevotes and edits. After that i've only answered some questions when i felt like it
 
he-he
 
I thought about a new concept:
- Good questions : answer them with a good solid answer
- RTFM questions : vote to close them, and in some cases answer them as Community Wiki
Your thoughts ?
 
I think everyone has 'limit' for farminh :p
 
3
A: RegEx: capture entire group content

HamZaLet's point out the wrongdoer in your regex (\w|\\|/)+. What happens here ? You're matching either a word character or a back/forwardslash and putting it in group 1 (\w|\\|/) after that you're telling the regex engine to do this one or more times +. What you actually want is to match those charac...

 
9:56 AM
@MadaraUchiha Ping
 
@HamZa I'm voting for close & comment RTFM link, usually
 
@Fabien Pong
 
but not always - sometimes it's about how to combine two or three RTFM-s - so I answer
 
@MadaraUchiha I had a good idea for a project :). PHP Go board. Using CSS3 it shouldn't be too hard to slap something up.
 
@AlmaDo yeah, that's if the answer is short
 
9:57 AM
Could use REACT too.
 
@Fabien isn't that a typical jQuery project :)
 
@Fabien Remind me about it later this evening, alright?
I need to go soon now anyway :P
 
@MadaraUchiha Sure :p
 
@MadaraUchiha be careful
 
@HamZa yeah, there's already a javascript Go site flying around, but this would be PHP.
 
9:58 AM
@Fabien --> this <--
:p
 
It's not a serious project idea. Just a for the luls one.
Would be a good exercise for learning.
@AlmaDo Yeah GoKGS is one of the largest servers for playing Go. Funnily enough doesn't work on iOs.
 
I've never played Go
 
@AlmaDo I'll teach you if you like.
@MadaraUchiha is learning. plays a teaching game every Saturday with me.
Would be much better if he had a rival.
 
to be honest, board games.. huh - 9-10 years left since I've played them? ..
 
@AlmaDo give it a shot, you might come to like it :)
Go has a very deep gameplay (that only gets deeper and deeper)
 
10:01 AM
Go tends to appeal to programmers. It's got some nice crossover. It's a great way to unwind or just relax while keeping your brain active. Offers always on the table if you're interested. And if you are, start here
 
Aight, lunch now.
 
@MadaraUchiha well, I like them - as I remember :p It's just because I have no partner(-s) to play with :p
 
i have one question link is here help me if u know..
0
Q: toggle of data from ajax only used in one page of datatable

parth khatrihello everyone here i put some code and i have ajax that goes into one file name is tabledata.php response come and show in next to that row on change of dropdown of quickview but it only works for 10 entries but in my datatable there are lots of entries ajax is not fired rest of others. my aja...

 
10:21 AM
fmdogmdfg
 
le morning
 
morning @PeeHaa @Ocramius
 
10:40 AM
Getting Error Registration is missing
when trying to send push notification from php server
what may be reason?
i am able to get registration id from GCM on my android device.but while sending any notification from php server getting this error,it was working fine prevously....suddenly got this error
 
@deceze Fatal error: Call to undefined function: preg_match_all() in test.php on line 49. This is what I gets when I use preg — user2723949 2 hours ago
^ damn ...
 
huh..
 
I would think that he's using a pre-historic php
 
@HamZa no
 
10:48 AM
hi, @Jimbo
 
@HamZa preg_match all is included as far back as 4.0.0
 
Hmmm I see
 
:p
 
hi
How to make exe or dll of web application (wamp).I have two requirements, 1. To install an web-application (wamp) at client computer (operating system is windows server) 2. For security reasons, I want that nobody can view/edit php files that I will deployed there.
 
@web2students.com well you could secure that folder with some permission-fu
 
10:56 AM
/me shouting at github pages
 
morning all. Whats the deal with php based API's only accepting json strings in specific camecase, eg it won't accept USERID but does accept userId?
 
@humza what if someone directly go to wamp/www/myfolder and view all files?
 
@Jarede because USERID != userId o_O ?
@web2students.com permissions permissions !!!
 
ok, windows permissions
 
@HamZa just uppercase/lowercase the keys?
 
10:58 AM
@Jarede it all depends on the developer building it
 
@HamZa this is the second time i've come across an API that can't handle uppercase/lowercase keys... i mean am i a poor developer myself to think people should be able to throw any case at it as long as it's spelt correctly?
 

« first day (1122 days earlier)      last day (3826 days later) »