« first day (1805 days earlier)      last day (3159 days later) » 

12:00 AM
@marcio Well allowing it on named functions may well have such an effect
 
70% of confidence that it would as:
class {
    fn($a) ==> if($a) something();
}
class {
    fn($a) ==> if($a) { something(); }
}
 
may I run, far, far away?
 
as the first example may seem more natural ^
the second example gives an horrible impression there is a missing '}'
@bwoebi you can try, but this will pursue you on your nightmares.
 
:'-(
 
Abe
brought to you by satan
 
Anonymous
12:58 AM
Why isn't a function that really sanitizes string in PHP?
 
Anonymous
Just remove everything excepts strings.
 
Anonymous
this is *(#\3*$!$#@$5^&*(~)) not cool.
 
> "Just remove everything excepts strings."

Can you give me an example?
 
Anonymous
3 mins ago, by samayo
this is *(#\3*$!$#@$5^&*(~)) not cool.
 
Hah I thought that was you expressing how uncool it is that there isn't such a function.

So you're trying to sanitize... "this is *(#\3*$!$#@$5^&*(~)) not cool" to produce... some string X?
 
Anonymous
1:06 AM
Nah, I just wanted to remove everything else except a-zA-Z
 
Anonymous
There should be a function for that, as most people don't know regex
 
I'm guessing you're trying to keep only alphanumeric (or just alpha)? Could use something like: `preg_replace("\W", "", $str);`.

> There should be a function for that, as most people don't know regex.

Something like `str_alpha($str);`?
 
Anonymous
preg_replace("\W", "", $str); will work?
 
Yup should do. Replace all non-word characters with nothing.
preg_replace('/\W/ui', '', $str).
 
Anonymous
How do you preserve whitespaces?
 
1:12 AM
So your regex should replace everything that isn't a word character or whitespace (or punctuation?) with nothing.
 
Anonymous
Yeah, I just want to keep white spaces, commas, and dot.
 
Anonymous
Ah, forget it. This won't work.
 
Anonymous
I know why, it can't work for me
 
You could be more explicit if you like, with something like /[^a-zA-Z0-9\s,.]/
regex101.com is a great resource.
/[^a-zA-Z0-9\s,.]/ will match everything that isn't a-z, A-Z, 0-9, whitespace, comma or fullstop.
If you use the 'i' flag (case insensitive) you don't need to specify A-Z. And because \w means "word character, which are letters numbers and underscores", you can simplify it to: /[^\w,.]/ui
So... preg_replace('/[^\w,.]/ui', '', $str);
 
Anonymous
Nope. I mean, that is not what I want at all.
 
Anonymous
1:18 AM
Imagine this piece of text.
 
Anonymous
this is text
$app->get('/message', function() use ($app, $user){
if(!$app['session']->get('flash')){
$app->setResponse(404, 'NOT ALLOWED');
} this is text echo $app['session']->get('flash');
echo "click here to go to main poge ";
});this is text
 
Anonymous
The thing here is to remove all the code, except the texts this is text
 
Anonymous
So, some heavy regexing is required for this.
 
Regex probably isn't the way to go for that.
 
Anonymous
Although to be clear, there is a delimiter before and after the code, so with that .. yeah, regex will do just fine.
 
1:23 AM
But it would catch 'echo' as well, wouldn't it?
 
Anonymous
Nope, there is no echo. This is basically a preview from a blog page. I didn't want the preview to contain codes from the main content.
 
2:09 AM
@marcio In PHP if and other control flow tools are not expressions.
In other languages that is not the case but they have different semantics than ours do.
But as it stands, no, you couldn't do anything like that
And that's why it looks so weird.
It's not that it doesn't make syntactic sense – it doesn't make semantic sense.
 
Do not try and echo the string, that's impossible. Instead, only try to realize the truth...there is no string. Then you will see it is not the string that echoes, it is only yourself.
 
im using php as a template for my web pages. When i use two <?php include?> statements and put a lot of html between them the page will break.
 
Anonymous
@AndrewHu Are you including a header?
 
Anonymous
If, so the page will break
 
including a header where? in the php include file?
 
2:23 AM
"break" is a vague term. Does it throw errors? Does it show a blank white screen? Does it render part and then just stop? Do demons fly out of your nose?
 
does it cook meth with a former student?
 
@PaulCrovella That's a bad break.
 
Anonymous
Actually, it does break the HTML code. I remember spending 3 hours for that error.
 
Anonymous
<?php include 'header.html' ?>
 
Anonymous
It's very weird bug.
 
2:29 AM
good morning
 
There's that word "break" again... Broken like a horse finally saddle trained?
 
@Orangepill morning o/
 
Anonymous
@Ghedipunk The HTML elements won't render properly.
 
Anonymous
You will see a pad, or margin gap somewhere, you'll pull your hair out for as long as you can, but never find out why it is happening.
 
Anonymous
2:32 AM
I have to remove every content until only the header was left. Actually, the browser even indicated the error with the markup
 
so what's a solution? remove the php include entirely?
 
include doesn't magically destroy rendering. If you've screwed up your output somewhere you've screwed up your output.
 
Anonymous
@PaulCrovella Yeah, that's what I thought initially. Which is why, I'm saying it's a bug.
 
if i include a ' but as ascii code does it still end the echo?
 
Anonymous
@AndrewHu show us code
 
2:39 AM
k when i get back to my computer
 
@samayo give an mcve demonstrating it
 
Anonymous
DIY
 
you're the one claiming there's a bug with include, so show some evidence
 
Anonymous
It has nothing to do with include, it's HTML/Doctype related that only occures when you include a header or more specifically <!Doctype html> ..
 
there is nothing wrong with that
what is the behavior you are seeing in accordance to that... I think you are misdiagnosing
 
Anonymous
2:46 AM
I just saw pad/margins without any code, breaks or anything.
 
the page just shows up as blank ill send code when i get home
maybe its a problem of the local php interpreter on my computer? ill upload the "broken code" to my web server first then see if that works
 
so far it's been a bug with include, "a header", and/or doctype declarations... pretty safe to say the problem's been misdiagnosed
 
I think it's probably a syntax error
 
Anonymous
i give up
 
2:59 AM
A progrmmer does not give up what he loves, he finds the love in what he does”
― Dan Millman :P
 
Anonymous
I'm not a programmer. I'm a freight forwarder :D
 
Anonymous
I hope I won't be coding anything but for fun in 2-3 year from now.
 
huh why??
 
ok i have some further insight
i have 2 php include statements right they are
<?php include 'assets/php/nav.php'?>
<?php include 'assets/php/footer.php';?>
if i remove the footer.php include statement the website works, keep it and i get a blank page.
 
Anonymous
@AndrewHu The blank part appears in/after the footer right?
 
Anonymous
3:08 AM
@AnmolRaghuvanshi I don't like programming that much.
 
the whole page is blank. when i go to inspect element nothing is there, the website favicon is even gone
 
Anonymous
So, this may be an error in the footer. And you have error_display turned off.
 
Anonymous
That is the most likely problem.
 
Anonymous
or that ^
 
3:10 AM
the nav.php code is here jsfiddle.net/f0f12npu/1 and the footer.php code is here jsfiddle.net/xb7pjwzb
or maybe the php interpreter is RACIST
 
Anonymous
There is nothing wrong with those files.
 
confirmed php is racist
 
Anonymous
confirmed
 
@AndrewHu is that what you are calling include on?
 
Anonymous
In any case, if you are getting a white page, you should always check to make sure, you either have error display on, or error log on to debug the issue @AndrewHu
 
3:16 AM
okay
i'm calling the include on 2 php files
each just echo the header and footer
 
don't use echo or the php tag... just but the content in the file
 
Line : 2, Error type : 4
Message : syntax error, unexpected ''' (T_ENCAPSED_AND_WHITESPACE)
 
php will output it as is
 
running on phpfiddle
 
t encapes and whitespace
wuuuut
 
3:19 AM
which file is that on
 
just remove echo
first file
 
oh huh removing echo works
 
Anonymous
Yeah, the echo is redundant, but know the origin of the error is rather interesting
 
and the php tags and the single quotes arround the whole thing
 
it makes the editor go all yellow but you can shaddup ide
 
3:21 AM
dreamweaver user
 
you have to remove the <?php tag as well
 
ohhh remove the php tag and keep the single quotes
 
http://chat.stackoverflow.com/transcript/message/25924842#25924842

follow this
 
okay
 
Remove the single quote as well.
 
3:27 AM
when i just have one php file and only import that it works but once I add the <footer> to the file it gives me a blank page again
time to find tat errors-display thing
 
@LeviMorrison I always forget that! Anyway I still have a hunch that this would become a thing even though PSRs disallow it:
class {
    fn something($a) { if($a) something(); }
}
 
I doubt it.
 
@bwoebi imported from scope, forgot to declare in parameters
 
Think of include('somefile.php'); as being replaced with ?>contents of somefile.php<?php
 
the fact that outer scope may change the variable makes it even more confusing (that's why it works better in functional languages)
 
3:30 AM
@LeviMorrison really? ok then. Maybe you're underestimating the impact of adding sugar or maybe I'm overestimating it.
 
I don't think that fn getFoo() => $this->foo; will start making people do that, no.
 
it looks like this specific line of code causes the page to go blank:
<h4 class="copyright">&#169; 2015 Tian Ye. <a href="">Privacy Policy</a> &#124; <a href="">Legal</a></h4>
 
go back a line
 
maybe headers arent supposed to have that much stuff in them?
 
@AndrewHu there is no distinction between headers or any other sort of content
 
3:34 AM
weird. I probably screwed up my css for the copyright header
 
3:45 AM
so turns out php just hates whitespace
the more you know right?
 
3:56 AM
Is MAKE_STD_ZVAL deprecated?
> zval allocation macros ALLOC_ZVAL, ALLOC_INIT_ZVAL, MAKE_STD_ZVAL are removed.

Cool found it.
 
@bwoebi Did your branch break like a lot of tests? I am checking it out from GH right now but for whatever reason it's downloading really slow
 
4:25 AM
Is there a nicer way to compare two zvals?

zval is_equal;

is_equal_function(&is_equal, op1, op2);

if (Z_TYPE_P(&is_equal) == IS_TRUE) {

}
 
Figured it out.
 
4:46 AM
okay... simple git question ... I edited a readme on github as well as made chages to my local repo... how can I pull the remote changes without overwriting my local ones so I can push up my local changes?
 
@PaulCrovella seriously get dup hummer
 
Abe
not a git expert but if you pull and your local branch is ahead it will be asked you to solve the conflict @Orangepill
 
@Orangepill git rebase origin master
 
sweet.
 
@NullPoiиteя I'm a quarter of the way there... it'll happen any day now
 
4:52 AM
should I commit any staged changes?
fuckit.. yolo
 
You only live once, but a public git commit with a private key is forever...
"I don't always commit to master, but when I do, I git push --force."
 
all good now :)
 
I've read the o'reily git book but I use it so infrequently that I forget about 90% of it.
 
What do you think?
This didn't add fn or => for named functions – just closures.
 
4:59 AM
hey guys :d
 
5:28 AM
moin
 
@JoeWatkins mornisdfjksdfing
@Orangepill \o
 
6:03 AM
can anyone help me a bit with this question? Atleast some headsup? I'm stuck badly
 
6:32 AM
Good morning Rebecca Black ... people
 
o/
 
7:08 AM
Hey @duik

1. Is that a National cover?
2. Is duikboot dutch?
 
return true;
 
Abe
   _    _
  | |  | |
  | |__| | __ _ _ __  _ __  _   _
  |  __  |/ _` | '_ \| '_ \| | | |
  | |  | | (_| | |_) | |_) | |_| |
  |_|__|_|\__,_| .__/| .__/ \__, |
 |  ____|  (_) | | | | |     __/ |
 | |__ _ __ _  |_| | |_|_ _ |___/
 |  __| '__| |/ _` |/ _` | | | |
 | |  | |  | | (_| | (_| | |_| |
 |_|  |_|  |_|\__,_|\__,_|\__, |
                           __/ |
                          |___/
 
morning!
 
Abe
hey o/
 
7:31 AM
grrr travis ... if I ever meet anyone called travis, I'm likely to attack them ...
 
@JoeWatkins My name is Travis....
 
Abe
get him!
:P
 
$me = getExitPlan(); $me->run;
 
well, crap ...
I have to build in nodebug mode to reproduce ...
but no debug symbols so can't trace ...
urm ...
ELP
 
Does that mean I avoid getting punched ?
 
7:45 AM
anyway to symbolize a trace ?
@Epodax no, you're still getting it ...
:D
 
fuck I mean, fridge.
What if I told you my name really wasn't Travis?!
 
ping @NikiC @nikita2206 @bwoebi @ircmaxell @Sara @Andrea ... anyone ...
I'm not even sorry for the mass ping ...
 
Hey! Unfair, no reason to call in more people to punch me!
 
hehe
 
@JoeWatkins If you don't mind me asking, did you ever find a solution to your sponsor issue?
 
7:48 AM
yeah, I'll finish the extension so fast that there is clearly no need for donations ...
job done ...
I'll be done before I sleep again ...
 
Roger :)
 
morning
 
oh noooes
it's worse than that ... I can't reproduce on my machine :(
anyone with a vm or unix that I can access by ssh, please run uopz tests for me to see if anyone else can reproduce ...
moin @Naruto
 
uopz ?
 
7:54 AM
ungodly runkit like software ... but better php.net/uopz krakjoe/uopz
 
ah
 
morning @Sjon
 
morning!
 
does anyone know how to reproduce travis in a vm, are there vagrant boxes for that ?
 
@JoeWatkins nope, that's travis "secret sauce"
 
8:02 AM
Morning.
 
posted on September 25, 2015 by nlecointre

/* by Randal */

 
8:19 AM
Does anyone know if count_query(); is a valid thing? never seen it before
 
@Epodax Test Succeeded.
 
@MikeM. Just couldn't post here :P had to reload page.
 
@Epodax Haha welcome :-P
 
For some reason it kept giving me "Error happend - Retry - Cancel - Edit"
 
Shit happens :-P
anyways count_query(); neither heard of it, is it a custom method?
 
8:23 AM
 
user1804599
hi
 
user1804599
PeeHaaPee
 
He seems to be using it to execute his queries, but I wanted to be sure I wasn't doing something wrong before asking him about it :P
 
Hey @elyse!
 
user1804599
8:26 AM
Alles gut?
 
Hi PeeHaaPee, ElyseIf
 
@AlmaDo o/
 
Schön tag?
 
Busy, but friday
 
user1804599
Today is a wonderful day.
4
 
8:28 AM
@elyse you dind't even try, man (:
 
Woke up to the sound of my fridge-freezer doing it's best impression of a food grinder at 5am -_-. Bastard machine. I had to go pull it out from the cupboard it's embedded in and turn it off and on again trying to diagnose. Eventually after leaving it off for about 5 minutes I turned it on and the noise slowly got quieter till it stopped. Then I spent the next 3 hours having nightmares about my fridge-freezer needing some serious defrosting.
 
@Fabor The pro is that you now have an excuse to get pickup food only :P
 
@Fabor you have fridge? rich bastard Oo
 
@Fabor It's the... "Return of the Fridge: Melted ice cubes!" dam dam dam.
 
user1804599
@AlmaDo hard-working gentleman.
 
8:31 AM
heh. Fridge is in fine working order this morning. Though I need to re-shelve it.
But pulling a fridge out of the wall at 5am in your undies is no fun.
 
user1804599
My favourite commercial involves fridges: youtube.com/watch?v=gjAZ5esOBZw
 
tssss my boss at my internship gave my 50euro to have fun in the weekend ^^... rofl
 
user1804599
My boss gives me 50 euro each day.
 
internship is unpaid here :-P so ye...
I am happy :P
 
user1804599
> Bergen op Zoom, Netherlands
 
user1804599
8:33 AM
Nearby, nice.
 
Wut?
 
user1804599
Mike M., Bergen op Zoom, Netherlands
136 11
 
user1804599
it says that
 
ye...
I know
Profile Spy much ? :P
 
user1804599
BoZ is nearby.
 
user1804599
8:35 AM
It's like twenty km away.
 
Roosendaal? :P
 
user1804599
:3
 
My internship is in Roosendaal :P
 
user1804599
Nice.
 
@Fabor Yeah. That works much better nakkid
 
8:36 AM
but it's by a self-employed boss whose running internetional & Chinarello
 
@MikeM. That sucks
 
Mwah, it's quite a fun time here so that weighs in against the no payment.
However it's better than being at college ^^
 
@PeeHaa its unpaid here as well :(
 
I do miss the discussing with developers around you and increase your own knowledge tho' that's the sad part
 
@MikeM. :P
@NullPoiиteя Yeah but you live in the 3rd world :D
 
8:42 AM
@PeeHaa Get's to have intelligent dev discussions with his boss all the time.
 
@Fabor lol
 
But that's where I get to the point having (sometimes extreme) discussions with my friends and together we work up our knowledge by sharing what we know and brainstorming together about it.
 
@MikeM. you are atleast intern... i was never intern one damn company hired me, my boss just assigned me live work and gave me dead line.. and only help i have got was internet :(
 
@NullPoiиteя Well ye, it is required by school uno... and this is my second time here, my boss liked how I worked.
But I neither get hired [for a job] anywhere else just because I am a full-time student.
 
@PeeHaa true i am thinking to get job in another country ;) (had nice interview with one Spanish company )
 
8:46 AM
@NullPoiиteя With the current situation that is also somewhat 3rd world now :P
 
@PeeHaa :P
 
user5020521
can anybody take a look at this code? pastebin.com/i6Jfxpsv
 
@MikeM. you can always get part time job :) there is nothing in making money while learning
 
@NullPoiиteя I was talking about that, and not just IT related.
 
@PeeHaa you mean Spain is not nice place to move now ?
 
8:47 AM
I just don't get hired because of that.
I was almost hired as "scammer"- sales guy at the mediamarkt
 
@NullPoiиteя Southern europe in general is still struggling with the financial crisis
 
But someone with more exp. in selling goods just stole it from me :-(
The section manager liked me and really tried for me {he gone to the same school as me XD} but the manager rather had experience then someone who knows what he is talking about and can help the customer further with it.
 
@PeeHaa in that case our country is doing fine too... there is no sign of financial trouble
 
is this example a good one on the repository design pattern? github.com/domnikl/DesignPatternsPHP/tree/master/More/…
 
9:22 AM
What problem are you actually trying to solve?
Pattern based development is crap
 
PoS windows keeps running at 100% physical memory and poolmon is nowhere to be found on Windows 10
 
@PeeHaa I'm not trying to solve anything, just trying to figure out how it works, and based on the example I provided I was wondering what happens when you want to add a method to retrieve an entity based on some criterias, adding another method to the storage interface sounds weird
 
10:02 AM
@PeeHaa Entity / Repository is a great generic pattern for persisting anything - separating the thing you want to save from how it is saved
@Rommy In that case you would decorate with your custom criteria
 
@Jimbo I know what it is :P I said pattern based development instead of problem based development is poor ;)
 
@PeeHaa All development is problem based if you develop in PHP :D
 
@JoeWatkins If you contact Travis support you can get ssh access if you ask nicely, and explain what you're doing is for open sauce.
 
@Jimbo :D
Point taken :P
 
@Danack I did not know that ... I managed to reproduce in the end ...
 
10:09 AM
@JoeWatkins Congratulations on the conception
 
golf-clap
 
Man, I need to do some work :-P
 
he's so funny ...
written talk yet ?
 
I was also going to ask that @Jimbo
 
I'm doing it :-)
 
10:10 AM
so ... no ...
I think if you just admit to yourself that you haven't done it, you'll feel better ... own the problem Jimbo :D
 
btw @JoeWatkins you might already know this, but I'm going to post this here anyway; how to trace segfault travis with GDB:
gdb -batch -ex "run" -ex "bt" --args /home/travis/.phpenv/versions/5.6/bin/php -d extension=imagick.so -d extension_dir=modules ./debug.php 2>&1
/dat keyword seo
 
I'm not understanding
 
@Jimbo Also in most my projects the thing I want to save is called an array :P
 
how do you tell which tests have failed in order to invoke gdb on them ?
 
;-)
 
10:13 AM
PHPT needs on-failure ...
 
PHP needs failure ...
 
That's a separate bit. The problem I needed to use that for was php was segfaulting on travis only, in the shutdown routines.
 
@PeeHaa So with an array of data, you use a builder to build an entity, then persist the entity. When you get data from the DB, you use a mapper to turn it into an entity. When you want to transfer to json for your view, you use transformer
OOP ALL THE THINGS
 
Ah the great json_encode transformer :P
 
@PeeHaa Gotta be in an object bro, SRP ;-)
Besides you don't want to jsonify the whole object, just specific parts of it
So the template knows exactly what it's being given variable-wise
 
10:15 AM
@Danack that's what I've got, but only one test fails ... for some reason, zend detects some strings as leaks and free's them, but they are being used as keys in function/method tables and so everything blows up ...
 
class Json { function transform ($data) { return json_encode($data) } } // instant rockstar :P
I should probably start doing something useful before I get too crazy :)
 
$data ~> json_encode($data); //super-star
 
any one know how to aptget php7 on ubuntu?
 
useful things are over rated
 
@AlmaDo lol
 
10:17 AM
@Petah no ... build it yourself I would ...
 
omg
 
:P
 
they never done that before ...
 
there is a ppa here but it wont install for me ppa:ondrej/php-7.0
 
10:18 AM
Although word of caution using 3rd party repos can result in dependency hell
 
404
 
@JoeWatkins lol I see
 
@Fabor is that shit inside?
 
It's an oreo
 
10:19 AM
I was gonna say oreo
 
@PeeHaa class EntityTransformer { function transform(Entity $entity) { return array('name' => $entity->getName(), 'average-age' => $entity->getAge() / self::AVG); } // Arbitrary example
 
Ah I was trying different things, but for some reason didn't try the obvious thing
 
When I'm working around, I create workaround
 
if you can't trust them to write down the ruddy url properly ...
just build it yourself ...
 
10:21 AM
@Fabor don't know that :p
 
thanks @PeeHaa that worked
 
you used nightly, right @Petah ?
 
You live in the land of Haagen Dazs. You should get "Cookies and Creme".
 
o/ room11
any ideas why (preg_match('~/~', '/someString', $match) == 1 ???
 
Bergen auf Zeum
 
10:33 AM
Lol, this is the third time some scammer tries to call me to tell me my Windows is "infected"
third time today
 
@sitilge you're using ~ as your regex delimiter and matching /, which occurs in your subject string
 
we got a a phone with an electronic woman in it, anyone who calls needs to give the company they work for and purpose of their call @Epodax
best 40 bucks we ever spent ...
 
@Danack yeah, was using that
 
...then I can't understand what you're asking us....as it tells you on that page why stuff matches.
 
10:38 AM
@JoeWatkins this is on my private phone tho :P
 
@JoeWatkins pong in case nobody replied yet
 
@Danack it does not provide the # delimiter
 
@bwoebi thanks, they didn't ... I got it though ...
 
was looking for alternatives, found ~
 
If you paste in a string like ~this~ it will see the beginning and end chars match and use those as the delimiter.
 
ThW
10:40 AM
@sitilge I prefer using the brackets: (pattern)options
 
I found tidier ways around the problems from yesterday bob, the only fail remaining now is in 007
 
I can hear everyone trying to think of a Bond joke
 
** more convert rebecca link needed**
 
might be related actually, not sure what to do about restore ... I think I need to edit the bucket's key for internal funcs, not sure what the rules are though, persistent/interned, I dunno ...
 
10:50 AM
never heard of it ...
 
me neither.
 
did scan build ever finish ?
 
@LeviMorrison uuuuuh… you removed the statement syntax? :-(
And how are you now going to make your partial application use cases look nicely?
 
@JoeWatkins yeah. It was taking ages due to IO. The virtualbox VM is very bad at IO, and it generated 2gigabytes of HTML to explain what it was seeing. The only actual issue it found was a useful one though: s3.amazonaws.com/static.basereality.com/analysis/…
Two other ones are apparently not issues. Because png_error kill the process....which is exciting.
And so the reason I'm even looking at this stupid TAP test framework is that code from the first link can never have worked...so it must never be being tested. Or possibly even used.
 

« first day (1805 days earlier)      last day (3159 days later) »