« first day (1998 days earlier)      last day (3172 days later) » 

00:00
ah, yes, that I already saw
I was thinking "crawl every file and include it"
something, something, run the smoke tests and use those files...
atomic deploys are tricky
You
You
I died because of one.
@You did you roll back?
@JoeWatkins yes. Don't rely on atomicity. You should be able to run old and new builds in parallel for a few seconds
00:05
@Danack could work, yes
You
You
@Ocramius No.
00:37
When I find whoever wrote the code in the Diactoros stream bits that FUCKING TRUNCATES A FILE if you pass a filename to the stream constructor, I will end them.
The end of this person will be exceptionally violent.
I just wasted an hour trying to figure out why the hell it wasn't properly serving up the image I told it to only to find it'd nuked the entire image.
Number of bugs I need to file in major projects because of my side project count: 2
I'm disappointed that that isn't a "too many redirects" error. Or a forever-nesting iframe.
hey guys
does anyone know an answer for this?
5
Q: Image upload via ajax POST without using HTML form

Yohan BlakeI am trying to send some data via POST method to a PHP file without using form in HTML. This is the code I have. Why doesn't it do anything? <input type="file" name="fileToUpload" id="fileToUpload"> <input type="hidden" value="<?php echo $row['Gallery_Id']; ?>" name="gid" id="gid"> <input type="...

00:54
bleh
@NikiC You around? I've put together an IntlCharsetDetector implementation, but the reality seems to be that the underlying ICU implementation just isn't very dependable. Most of my test cases are getting bad results (not because of the extension glue, but because it just doesn't guess very well).
Kinda thinking of NOT proposing it, tbqh
Wes
Wes
@Sara also, providing functions to detect charsets is like telling people it's a good idea. people would use such functions without having knowledge of how charsets work. they do that already with mb_detect
@Sara if you do end up proposing it please rename it to IntlCharsetGuesser
4
Wes
Wes
^ nice @PaulCrovella :D
@PaulCrovella IntlCharsetIDunnoMaybeWhyYouAskingMe
@Wes Yeah, I'm inclined atm to not actually propose it in an RFC
01:07
we do have a difficult enough time already with people thinking mb_detect_encoding works.. or could possibly work.
Wes
Wes
however it could become useful if icu implemented it with its usual magic (maybe it will, in future?) like not only comparing sequences but also actual words using dictionaries and sorta things. that would be useful, but i don't think it's going to happen...
nikita is likely in bed
01:21
@JoeWatkins nah … but busy visiting, I guess.
did I read something about him not being home right now ?
yeah, he said it last night
I wasn't sure if he was talking about right now
Wanted to take a shower after doing the dishes… BRRRR the thats fluid ice!
no warm water left :-(
anyone?
01:27
/me sleeps
Wes
Wes
gn joe \o
 
3 hours later…
04:33
does anyone know if json_decode, or $_GET/$_POST is faster?
05:06
What is the best way to upload an image by user id via php and ajax?
05:42
moin
dude, you just went to sleep
^ romnin
Hey everyone!
@PaulCrovella yeah ...
ormin ekin
Hi everyone good morning
05:45
I'm in a crisis! Can anyone point me in the right direction for generating download permission on Woocommerce by bulk please?
there's a wordpress room iirc
no idea really...but maybe something like this
@Ekin I tried that, and unfortunately it did not work fully for some odd reason?
I'm thinking about a SQL query, but not exactly sure what I would need to move and to where? What makes it even more difficult is I only need the permissions to be granted to customers of a specific product!
well.. you might prepare a well explained question and try identifying that odd reason to get better help
Anyone know a good git?
05:57
asking just out of wonder, but was there an alternative to this ? @JoeWatkins
@Ekin not yet, I think Levi was working on a new rfc
idea seems pretty useful
@AboutLeros use PJAX, it's easy
yeah, the most useful part is probably the most controversial though, I'm not sure what the next rfc will look like ...
if I have to use() then it's not really short ... but people hate magic, and auto importing vars is magic ...
@AboutLeros give this a week: github.com/Jquery-PJAX/PJAX
i'm dumbing ajax way down for gets to do a speech on pjax
06:01
@acoder Thanks
I'm just guessing.. but there are more lower level reasons for not using something like =>
I think that was just preference
that's another thing people didn't like, deviating from hhvm
or hack, or whatever you want to call it ...
just saw that part as well, I see
afk, taking misses to work
o/
mornin
Wes
Wes
\o
Morning
06:25
1
Q: How do I bulk generate/grant download permissions on WooCommerce?

Tyree BrownI am in a situation. I have a downloadable product, with over 3500 customers buying it so far. While updating the downloadable product, apparently I messed up and some how removed access to the current 3500+ clients resulting in many confused emails. The customers are still shown as buying the di...

5874 messages in 4.5 days ... we definitely don't spam enough.
06:36
whats everyone working on?
06:51
moin bob
moin all
07:05
@JoeWatkins moin
@JoeWatkins Hadn't Dmitry said he wanted to work on / review typed props this week?
don't think so
might have a bit of a problem
@JoeWatkins Okay, because I thought he said that, but possibly this on was on IRC…
@JoeWatkins what problem?
Hello, anyone here know Both PHP and Javascript because i need a help in converting the PHP code function in JavaScript.

Please check : http://stackoverflow.com/questions/36418470/unique-random-div-id/36418691
throwing the exception before the write occurs, or throwing it after (which is preferable because of magic) and restoring state
someone should write a curl cli2php online converter to prevent all these stackoverflow.com/questions/36419335/…
morning
07:11
<?php
$foo = new class {
	public int $bar = 10;
};

try {
	$foo->bar = "test";
} catch(TypeError $t) {
	var_dump($t);
}

var_dump($foo);
object(TypeError)#2 (7) {
  ["message":protected]=>
  string(65) "Typed property class@anonymous::$bar must be integer, string used"
  ["string":"Error":private]=>
  string(0) ""
  ["code":protected]=>
  int(4)
  ["file":protected]=>
  string(23) "/usr/src/php-src/ex.php"
  ["line":protected]=>
  int(7)
  ["trace":"Error":private]=>
  array(0) {
  }
  ["previous":"Error":private]=>
  NULL
}
object(class@anonymous)#1 (1) {
  ["bar"]=>
  string(4) "test"
}
@JoeWatkins before write, definitely
what about binary ops ?
you mean compound assign ops?
Can anyone please answer to my questions
07:13
still before write
not always possible, objects can have overloaded properties
posted on April 05, 2016

New Cyanide and Happiness Comic

@RajeevRanjanSharma stackoverflow isn't a code transpiler...
@JoeWatkins what do you mean?
@bwoebi i know, But i know stackoverflow consist of many PHP and JavaScript experts. And they can help me to make it possible
actually I got an idea
be better to move verification out of vm and into handler I think
07:15
@Gordon I know I've seen one before, but I'm not finding it right now
@RajeevRanjanSharma In general you either hire someone to do it or you learn enough JS to d it yourself.
@JoeWatkins write or read or both?
not sure yet, at least write
probably better to leave read in the vm
read handler is not hit for inline properties
@bwoebi learning on process, That why i am asking if some one can give me idea or provide me some tips to do that
need both
for both
@JoeWatkins well, write, not sure about indirect property fetches though?
or are you disabling indirect fetches for every typed prop?
That's going to make it slow possibly...
not sure if it's anyway necessary though…
07:20
@Sara Hm... I dunno, I don't need it personally. Probably the only good thing there is to say about ICU charset detection is that it's still better than mbstring charset detection. Is that enough? ^^
@RajeevRanjanSharma you already have an answer to your question, stop spamming
good mornings
@iroegbu and now he's bothering the JS chat…
Lol... He can go bother Fernando Po for all I care, he should just stop here.
morning
Anonymous
07:39
morning
krakjoe@fiji:/usr/src/php-src$ sapi/cli/php ex.php
object(TypeError)#2 (7) {
  ["message":protected]=>
  string(65) "Typed property class@anonymous::$bar must be integer, string used"
  ["string":"Error":private]=>
  string(0) ""
  ["code":protected]=>
  int(4)
  ["file":protected]=>
  string(23) "/usr/src/php-src/ex.php"
  ["line":protected]=>
  int(7)
  ["trace":"Error":private]=>
  array(0) {
  }
  ["previous":"Error":private]=>
  NULL
}
object(class@anonymous)#1 (1) {
  ["bar"]=>
  int(10)
}
Morning
08:12
mornin
mornin tereško,Oldskool
mornin
Does anyone know how to make Doctrine return multiple entities per query without returning a flattened array where each element is an entity?
I would want an array element per row and inside that element it would contain an array of each entity in that rowset
Anonymous
Anyone else having issues with github?
yes
08:24
Moion 11
<?php
$foo = new class {
	public int $bar = PHP_INT_MAX;
};

try {
	$foo->bar++;
} catch(TypeError $t) {
	var_dump($t);
}

var_dump($foo);

try {
	$foo->bar += 1;
} catch(TypeError $t) {
	var_dump($t);
}

var_dump($foo);

try {
	++$foo->bar;
} catch(TypeError $t) {
	var_dump($t);
}

var_dump($foo);

try {
	$foo->bar = $foo->bar + 1;
} catch(TypeError $t) {
	var_dump($t);
}

var_dump($foo);
all good ...
@Ocramius Nope. Opcache severely lacks regarding that
Hi,
We need to highlight the specific text in existing pdf using position or by passing the text with the starting position.
Currently we are using fpdi-tcpdf to edit the existing pdf.

https://www.setasign.com/products/fpdi/about/

https://rubayeet.wordpress.com/2010/02/05/modifying-pdf-files-with-php/

Is there any inbuilt functions in tcpdf for our requirements?
@Wes Put it in the security room :D
08:36
is github misbehaving for anyone else ?
Anonymous
@JoeWatkins Yeah - status.github.com
@KarthikKeyan what does the tcpdf documentation say?
These new Dyson urinals make a huge mess. Not recommended. http://t.co/amWoH9pMlr
4
wat
(on the feed of the same guy)
The best bit is all the people calling him an idiot "it's a hand dryer!", thanks internet, faith in humanity--
08:43
@Leigh ah, I hadn't scrolled down so far
@PaulCrovella we cant find a function to highlight the text in existing pdf
then there ya go
@PaulCrovella, i did'nt get u
haha just saw that too :D
08:49
brilliant
Guys should we connect to two databases?
for example username and passwords are in one db
while the rest is in another
@KarthikKeyan you asked if it had a built-in function to handle it. it either does or it doesn't. you read the documentation and it's not there, so there's your answer.
I mean for security reasons should we store sensitive data in another database?
@Asperger what security problem are you trying to solve?
If someone gains access to the host with your source code on, they gain access to both databases anyway
Anonymous
08:55
eh.. I swear I didn't remove that..
Anonymous
ah well.
when github misbehaves it really ruins my day ...
seems to be up again, just slow
Yeah, it's up but extremely slow :(
I don't always DDoS github, but when I do it's because @JoeWatkins wants to do something with it.
08:59
@DaveRandom Please tell me you checked your linkedin
user image
11
ty :-P
Aw dammit it's in the wrong order
Ah well, you get the gist of it ;-)
@Jimbo Not really, Gist is down as well! :(
It's perfect as is... LOL
Anonymous
09:04
@Oldskool lol
Oh yay, GitHub status just updated to 10:48 CEST Major service outage.. :-(
So when I get an infectious disease from a lubricated shaft blast, I know where to come, nice
Anonymous
I wander is someone can endorse me on linkedin if I share my profile here. It really be nice and helpful for job mining.
It's at time like this when you realize how dependent you've become of GH. I'm sitting here like ... "OK, the details to the issue I'm supposed to fix are in issue #1538, let's see........ or not. OK now what?"
just keep f5ing unicorns I guess
@Leigh You need to past tense the last part
09:08
@Jimbo "I know where I was"?
@Leigh "I know where I came" Never mind
What's the best way to store a property that a bunch of classes have?
Would I use a protected $var in the parent class and have the child classes simply overwrite it, or should I have each child class override the getter method to retrieve that data?
Morning
I guess I could require it as part of the parent's constructor, then have the child class call it with it's data
09:10
@Sean What is the property and what are the classes?
@Sean So each class has it's own value for that property? Or is it sometimes shared between multiple classes?
Note types :p How exotic
Each child class has a unique type.
!!wiki Foobar
The terms foobar (/ˈfuːbɑːr/), fubar, or foo, bar, baz and qux (alternatively, quux) and sometimes norf and many others are sometimes used as placeholder names (also referred to as metasyntactic variables) in computer programming or computer-related documentation. They have been used to name entities such as variables, functions, and commands whose exact identity is unimportant and serve only to demonstrate a concept. The words themselves have no meaning in this usage. Foobar is sometimes used alone; foo, bar, and baz are sometimes used, when multiple entities are needed. The usage in computer...
@Tyrael bump
09:12
@Sean In that case I'd create an interface that declares the getter/setter for the type and just make sure each class implements that interface (and thus set the type internally, through the constructor if it's a required property).
Adopting it from the parent doesn't make much sense if it has to be unique.
would this: /RID@*.{1,10}/i be the correct regex to capture this : RID@1111
maybe: /RID@*[0-9]{1,10}/i
@Oldskool Hmm, true. Right now I have an abstract parent class implementing the interface with the getter methods, etc. It would also be suitable to cut out the parent class and have all child classes use the interface, that's a good plan, thanks ^^
@KristianHareland that one is better - you won't need the i modifier if it's all uppercase
would it return all matches ?
09:14
@KristianHareland hopefully not all but only the fitting ones.
/RID@\d{1,10}/i
even if the list is: RID@12 some random text RID@114
d = digit = [0-9]
ThW
ThW
@KristianHareland regex101.com/r/bD8cB3/1
i need the g modifier then ?
Anonymous
09:16
@DaveRandom I've been meaning to ask, are you still using CentOs and Nginx?
So long as you're aware that the numeric portion will be between 1 and 10 digits long, then yeah
err, not for the g modifier
$Match = 'RID@13 this is some things RID@14';
preg_match('/RID@*\d{1,10}/g', $Match, $matches);
echo "<pre>";
print_r($matches);
ThW
ThW
@KristianHareland RegEx in PHP have no 'g' modifier, it is a separate function
thats why i got the errors
how would i do it instead ?
preg_match_all ?
yesssss
> can you re-declare a final property in a sub-class, making it therefore
non-final? (I have reasons to do that, related with altering states via
mappers)
@Ocramius you're the worst ...
Anonymous
09:19
!!docs preg_match_all
I am :)
[ preg_match_all ] Perform a global regular expression match
Anonymous
@Oldskool It's back :)
@Jay Yeah, it seems to be getting back on it's feet again.
09:22
lost out on CI in that time though ...
now have to make silly commits to PR's ..
aaand github is back
@Saitama I don't get it
should she have said "while you're out sudo buy some milk"
has someone worked with in-place WYSIWYG editors lately? maybe some suggestions?
it's not really back ...
09:34
is github down?
@Saitama Scroll up ;-)
Anonymous
Nope, works fine
Well, my day is ruined... trying to debug legacy code locally: Fatal error: Uncaught Error: Call to undefined function mysql_connect() i
@Leigh Hmm, yeah that sucks.
@Leigh well, don't run php7
09:43
heresy
@FlorianMargaine *7.1-dev
@Ekin Damn, that's one big mess.
look at question title :P
indeed
09:58
There should be minus reputation :P
(I'd totally make an account to get the lowest minus without getting banned)
@DaveRandom I know you're "always busy on a Tuesday", but tonight's PHPNW user group is at auto trader uk and has free pizza and drinks, just so you know
I will have an extra large sausage pizza slice in your honour
Would you like to run quickly a script in a single version? Help me build it; donate some mBTC! Details @ https://3v4l.org/
3
Having to use btc doesn't really help @sjon's cause
Not really, I don't know too many people that actually have an active btc wallet.
Had he went with crowdfunding or just asking for donations in PayPal, he'd probably reach the goal within a week.
10:05
@JoeWatkins hmm, he already has all the versions apparently. why does he need help limiting 3v4l to one version? isnt that basically just one select box with the version and then not running all the other versions? as in 30 minutes of work? what is difficult about it?
3v4l isn't OS, right?
it's not os ... and I'm not sure how difficult it is ...
i'd probably spin up a docker container per version
@JoeWatkins Can you sandbox PHP?
I wish I even had a way to buy BTC that doesn't require me to verify that I'm not a terrorist
10:07
@Ocramius Why, can't meet that requirement? ;-)
@MadaraUchiha you can set basedir restrictions and disable certain functions
@MadaraUchiha not in a stable way, I think he uses chroot jails
possibly some patches, not sure ...
I'd want to patch it ... lots ... it would basically be one big patch that you ran, not php at all ...
ok, so i did a lame thing in a project some time ago.. i used a function to return a new PDO object for every call i did... Would it be possible for me to just change the function to:
function db(){ global $WA_DBH; return $WA_DBH;} ?
@Oldskool I'm already a terrorist according to the HMRC, apparently
@tereško is famous!
Cranky comments on Stack Overflow.. I like this one https://t.co/lJXxFZlr5j
9
10:18
hmm
Did you offer the man a job yet?
Well said though @tereško.
@Leigh It's more complicated than that & it's not my decision to make
^ that
10:26
Our espresso machine in the office has a touch screen. And someone just managed to #rickroll it. /c @internetofshit https://t.co/KQgnNG6Y4x
2 hours ago, by Wes
hackers https://twitter.com/eduardk/status/717213741734109184
Ah.
Missed that one.
it's ok :)
It's pretty epic though.... until you go and get like your 2nd cup of coffee for the day at that machine, than it's annoying as hell :)
Did you lot see when someone put quake on an oscilloscope (gif)? That was pretty cool...
10:36
@Oldskool wait til Friday
10:54
@Jimbo That's freakin awesome
@Ocramius you know the guy with the final props patch ?
@JoeWatkins met him at PHPPoland
you want to invite him here, before he puts up an rfc ...
alright
<?php
class Foo {
	final $bar;

	public function __construct() {
		$this->bar = 10;

		var_dump($this);

		$this->bar = 40;
	}
}

var_dump(new Foo);
?>
ask him to run that ...
zend is a magical place ...
10:57
@JoeWatkins I asked him to join here
@JoeWatkins ♫ once… upon a time… in a magical kingdom… lived… a unicorn… in a magical kingdom ♫
3
@Gordon is it by chance The Deadlock Empire?
10:59
I need to test the typed properties RFC against ProxyManager @_@
/me hides

« first day (1998 days earlier)      last day (3172 days later) »