« first day (2715 days earlier)      last day (2458 days later) » 

00:16
I finally made stuff like getLengthSpec and getAccountTypeSpec used in ifs to generate the sql progressively.
works well enough, and it's not completely ugly
ThW
ThW
@Allenph that sounds like you want to implement the ArrayAccess interface
@Allenph and Iterator or IteratorAggregate
@ThW Awesome. That solves one of my problems, but makes my other one worse.
Looks like I'd be duplicating those methods like 10 trillion times.
Once for every collection.
ThW
ThW
depends abstract classes and traits exists
Maybe dependency inject a concrete implementation of those interfaces whose methods are not type hinted, then for each collection simply write a function which is type hinted and uses that concrete implementation?
00:49
Guys again I have a question about a website :D How reliable/useful would PHP Mentoring website be and what is the approximate range of prices mentors demand in there? None of the mentors talk about the money in their profiles :p
I'd almost consider it unnecessary, if you're in this chat
But it depends entirely on your situation, e.g. if you need someone available to help you at a given moment because of work or such
Beeeecause you may have a question and ask it in chat, but you may not get an answer for whatever reason. If that's a problem for you, then looking into a mentor might be useful for you
@tereško this was in some youtube suggestion after tesseract youtube.com/watch?v=ws3Xd6SWFCs. maybe you know of it, just started it and it's pretty cool.
@Tiffany Yeah... I think that's almost an issue for me sometimes. Of course it's my second month in learning PHP but despite that I think I'm wasting a lot of time jumping from topics to topics to find out about things that I don't even know what they are! I want to try having a mentor for a while and see how it works. Well, that being said, i'm not sure if I can afford it b/c where I live our currency is quite worthless compared to USD. Do you know anything about the prices?!
Anonymous
01:05
@FélixGagnon-Grenier I love it
Anonymous
The second song also nice
@Simon.B personally, no. I haven't tried a mentoring service. I'm a one-man team at work, so I have no developers to interact with. I use this chatroom as a surrogate.
Anonymous
i'm saving those for work tomorrow
@Simon.B HOWEVER, PHP developing isn't my only job duty, so I don't need a mentor either.
@Simon.B It just depends on your needs and expectations.
@FélixGagnon-Grenier lol
01:09
.... yeah ;)
To be fair, I need to clean out my wishlist as well. I turned it into a "watch list" for games that I was interested in, before Steam added that feature separately. I just kept doing it out of habit.
the problem is, they keep creating new games that are mostly the same but all "look" great.
I've been hooked on a dumb mobile game for the past year.
I can't decide if that's better than spending money on steam sales.
Anonymous
candy crash lol
Lords Mobile :/
01:17
@Simon.B If you just stick around here long enough you'll learn enough to Google around.
I've been in this room like a year and I'm 5 times the developer I was before.
Same for me
Anonymous
I on the other hand am still as noob in PHP as I was when I joined 6 years ago
Anonymous
:/
@samayo I didn't say I wasn't a noob.
Anonymous
0
Q: confusing the php version show in terminal and phpinfo

achimetI'm confusing with my PHP version showing in my terminal and phpinfo info. as you can see in the image attached below.. anybody can help me fix this. Im trying to learn cakephp and the missing part is only the extension intl.

Anonymous
01:27
why do they have different versions though?
02:39
Allow multiple comparisons in expressions – #76140
02:53
@samayo That's a dupe.
21
Q: Why is the PHP version different in phpinfo() and CLI?

Salvatore DibenedettoI realized that there is a miss matching between the PHP version reported by phpinfo() and php -v (in the CLI). phpinfo(): 5.5.24 php -v: 5.6.9 I am working on a Mac OS X 10.10 (Yosemite) and installed a library (php-version) to try to manage the PHP versions. It reports me 3 different versi...

03:36
morning
 
2 hours later…
05:42
Did you guys know the Challenger crew were alive when they hit the water and may have been conscious? Jesus Christ. O.o
06:15
moin
06:26
o/
hello
It's a good idea to create trigger to insert into two different tables
Is there any problems in doing that
06:56
i have docker doubts
@Linus ?
@JavaFan ??
/me starts cmark docs
docker doubts?
@JavaFan yeah,let me do more experiment then will ask.
07:06
morning
moring
Wes
Wes
@JoeWatkins :( let me try again
Is there anyone have idea about my former question?
what if I commit a skeleton with it all layed out, and you have to just update return types and info sections, but don't have to fuck about trying to arrange it ?
Wes
Wes
that would be great
07:08
ok I'll commit a skeleton, soonish ... are you going to have time to do it today ?
docs roll out on fridays across mirrors, sometime this evening ...
we don't want the skeleton rolled out, in case mistakes ...
It's a good idea to create after insert trigger on table to insert into two other different tables
Is there any problems in doing that
Wes
Wes
can you put it on github for now?
I could do that ...
so you got docs running to the point that you can run php.net manual locally ?
Wes
Wes
-DCMARK_INSTALL_PREFIX=C:/libcmark what's this?
@JoeWatkins i'm trying again
for cmake'ing cmark
Wes
Wes
07:17
Unknown option -DCMARK_INSTALL_PREFIX; please try configure.js --help for a list of valid options
Checking for cmark.h ... <not found>
Checking for cmark.h ... <not found>
--with-extra-includes=E:\php-sdk\libcmark\src
--with-extra-libs=E:\php-sdk\libcmark\src
@JoeWatkins
what am i doing wrong
the paths are correct
-DCMAKE_INSTALL_PREFIX is used for cmark build like ... cmake .. -DCMAKE_INSTALL_PREFIX=C:\libcmark
-DCMARK isn't a think ... sorry I didn't read it right ...
Wes
Wes
need to explain me step by step or i won't get it :(
i don't know what cmake is
i have nmake on windows
it's like make, just with a c
how did you build libcmark ?
Wes
Wes
i didn't build it
07:25
ok that's the problem ...
Wes
Wes
i thought it would compile alongside php
install cmake
Wes
Wes
can't i do that with nmake?
... whatever that is
cmake isn't a make command, it's a "configure make" command ...
Wes
Wes
just checking maybe it's the same thing
07:27
like autotools configure
yes
then change directory to the root of cmark source, do mkdir build, then cd build, then cmake .. -DCMAKE_INSTALL_PREFIX=C:\libcmark then nmake, then nmake install
then you have cmark installed
then additional flags to configure should work ...
amphp/http-server v0.8.0 released. https://github.com/amphp/http-server/releases/tag/v0.8.0
3
Wes
Wes
@JoeWatkins this is the linux problem. is it possible that i need a 25mb tool just to "configure" a library of a few kb...
wtf does cmake do
it's an alternative to autotools ... which are small, but vastly complex and not very well understood
and autotools doesn't really do windows ... cmake does everything ...
07:39
@Wes cmake is pretty cool.
it really is actually ... I done a bit of experimentation getting php to use cmake ... never finished ... too messy, but if we were writing it today we'd use cmake
Wes
Wes
NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.
@Allenph Yeah there's no question this room is awesome. I'll surely visit here a lot in the future too. Thanks.
did you nmake in the build directory ?
Wes
Wes
that's what i'm trying to do @JoeWatkins
23/03/2018 08:41 51.985 ALL_BUILD.vcxproj
23/03/2018 08:41 274 ALL_BUILD.vcxproj.filters
23/03/2018 08:41 <DIR> api_test
23/03/2018 08:41 17.149 CMakeCache.txt
23/03/2018 08:41 <DIR> CMakeFiles
23/03/2018 08:41 1.778 cmake_install.cmake
23/03/2018 08:41 8.172 cmark.sln
23/03/2018 08:41 335 CTestTestfile.cmake
23/03/2018 08:41 11.145 INSTALL.vcxproj
23/03/2018 08:41 515 INSTALL.vcxproj.filters
(see full text)
doing that in this dir
07:45
I dunno what's happening
Wes
Wes
E:\php-sdk\libcmarkbuild>nmake

Microsoft (R) Program Maintenance Utility Version 14.11.25547.0
Copyright (C) Microsoft Corporation. All rights reserved.

NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.

E:\php-sdk\libcmarkbuild>
is it possible that cmake did the wrong visual studio version?
-- Selecting Windows SDK version 10.0.16299.0 to target Windows 6.1.7601.
user9098366
php.net/manual/en/function.addcslashes.php - "If charlist contains characters \n, \r etc., they are converted in C-like style, while other non-alphanumeric characters with ASCII codes lower than 32 and higher than 126 converted to octal representation."
user9098366
I understand that we are adding the slashes in front of the signs, but I dont get the converting part why signs like /n and /r are converted and also the other-non alphanumerich characters (to octal representation)
user9098366
we add slashes -ok, but we are converting something too? why? for what?
user9098366
if somebody understands...
user9098366
07:58
\0, \a, \b, \f, \n, \r, \t, \v - all these would get converted; and also non-alphanumeric characters with ASCII lower than 32 and higher than 126 (these to octal representation)
user9098366
what this is about?
Wes
Wes
@JoeWatkins do i need this
-- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "3")

*** A python 3 interpreter is required to run the spec tests.

-- Configuring done
-- Generating done
-- Build files have been written to: E:/php-sdk/libcmark/build
Wes
Wes
i just checked, it's using the correct sdk, x64
but still no fucking nmake
deracinate to isolate or alienate (a person) from a native or customary culture or environment.
Wes
Wes
08:00
Feb 25 at 22:04, by Wes
Oct 6 '17 at 11:24, by Wes
May 27 at 20:38, by Wes
Apr 7 at 9:40, by Paul Crovella
@wes has an uncanny ability to break his tools
23/03/2018  08:58            51.948 ALL_BUILD.vcxproj
23/03/2018  08:58               274 ALL_BUILD.vcxproj.filters
23/03/2018  08:58    <DIR>          api_test
23/03/2018  08:58            17.167 CMakeCache.txt
23/03/2018  08:58    <DIR>          CMakeFiles
23/03/2018  08:58             1.784 cmake_install.cmake
23/03/2018  08:58             7.932 cmark.sln
23/03/2018  08:58               336 CTestTestfile.cmake
23/03/2018  08:58            11.074 INSTALL.vcxproj
23/03/2018  08:58               516 INSTALL.vcxproj.filters
(see full text)
@Wes I'm waiting for you to break that quote nesting
Wes
Wes
soon
remove the build directory
make another one
cmake -G "NMake Makefiles" .. -DCMAKE_INSTALL_PREFIX=C:\libcmark
in the new build directory
user9098366
what would be a C-style conversion of "/n"
user9098366
ASCII lower than 32 and higher than 126 are non-typical so they need to be converted, I guess
user9098366
08:04
32-126 are typical characters
user9098366
lower than 32 special and higher than 126 non-typical
Wes
Wes
CMake Error: Could not create named generator NMake Makefiles
user9098366
so these get converted by the addcslashes() ?
user9098366
they have to get converted?
@ThomasMorgan You'll want to keep ASCII higher than 127, because it's used for UTF-8.
user9098366
08:08
I am asking about the explanation on php.net, prntscr.com/iv6srx
Wes
Wes
CMake Error: Error: generator : Visual Studio 15 2017
Does not match the generator used previously: Nmake Makefiles
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
E:\php-sdk\libcmark\build2>
user9098366
I will search in google.com, I dont want to bother here, I guess
Wes
Wes
there's no cmakecache file anywhere
Changes from #74892 are missed in 7.2 branch – #76141
user9098366
all these like /n, /r - they already contain the slashes so this needs to be converted? before another slash can be added? and then asci lower than 32 and higher than 126 - this needs to be converted too?
user9098366
08:10
why do we do this converting part?
Wes
Wes
CMakeCache.txt and CMakeFiles don't exist anywhere in the system
cmake is clearly drunk
I have no idea what you are doing
that makes two of you
Wes
Wes
fuck this shit
you know you don't need the ext installed to work on docs anyway ?
Wes
Wes
08:22
i wanted to get php.net running
and also the ext... for actually using it -__-
what is this command line tool perversion thing that you linux people have
why can't stuff just work
mornin
Wes
Wes
nothing, it keeps complaining on this mystical CMakeCache.txt that exists nowhere
@JoeWatkins if you make the repo i'll try to edit it
i blame adobe for all this
if i didn't have to use windows for photoshit i'd be using linux
08:38
you could fire up a vm
just getting a skeleton together is non-trivial when you are using namespaces, docgen fucks it up rather well ...
or inheritance
or types
basically it's bad at everything
speaking of docs, is php.net gonna automagically make a stub I can edit at some point for that function or is there something I need to do?
thee is something you need to do ...
Morgens
Wes
Wes
blood is boiling
morno
fixit @PeeHaa
08:47
fix what? :)
whatever doc shit it is joe says I need to do
he added a function, can you help him @PeeHaa ?
ermmm normally I would, but I am super busy atm :(
Can it wait a bit?
Wes
Wes
@LeviMorrison with hypothetical generics, what would be the scope of the type variable?
e.g. is this allowed/disallowed?
class X<T : Foo>{
    public static function baz<T : Bar>(...){}
}
sure, is in master only
08:48
kk
ping me later @PaulCrovella <3
@Allenph Yep, if it’s related to it sure
09:05
o/
hi all :-)
can somebody help me to arrived in this output?

$base = array("2017", "2017", "2017", "2018", "2018", "2018");
$replacements = array(1 => "x", 2 => "x", 4 => "xx", 5 => "xx", 6 => "xx");
$year = array_replace($base, $replacements);
print_r($year);
OUTPUT: Array ( [0] => 2017 [1] => x [2] => x [3] => 2018 [4] => xx [5] => xx [6] => xx )
search the year once found change other by "x" or "xx" but retain the year once thank you.
Wes
Wes
    @LeviMorrison or also

    use My\Foo as T; // #1

    class X<T : Foo>{ // #2
        public static function baz<T : Bar>(...){ // #3
            // T is #3
        }
        public static function qux(){ // T is #1 }

        function dynamic(){ // T is #2 }
    }
thoughts @room about that?
just use Java
2
o/ Happy Friday!
Anonymous
09:22
o/
Wes
Wes
\o
o/
I am starring to my screen watching why it keeps saying password_verify is always false
Good way to start my friday morning Kappa
Anonymous
full stack weirdos - how do you handle templating from an AJAX Call? i.e. Lazy loaded entities - Do you return html in the AJAX call or have markup in the javascript and loop the data etc.. etc.. ?
Anonymous
@J.Ende how did you hash the passwords?
Wes
Wes
09:25
@JayIsTooCommon i transfer json only, then i use developer.mozilla.org/en-US/docs/Web/HTML/Element/template
Anonymous
I got excited until I saw no ie support :(
Wes
Wes
it's easily polyfillable imho
for sure there are polyfills
Anonymous
legends, thanks
Wes
Wes
ftr that's not how i use it
i should probably use a polyfill too
09:34
I still render on backend most of the time
But I also don't do that spa crap often
feel great in Turkey :-)
Wes
Wes
chicken is more tender
steak is more meaty
Wes
Wes
steak is more steaky
fried eggs are more friday
09:42
Dave is more random
Common sense notwithstanding, the universe continues unabated
Wes
Wes
@PeeHaa tomorrow qualifying at 7 am
red bull and mercedes looking good
ferrari apparently less :(
car is understeering a lot
i expect a pole from redbull
09:53
@Wes ooooh yay \o/
@JayIsTooCommon $hashed_password = password_hash($pass, PASSWORD_DEFAULT);
Wes
Wes
could be verstappen's year... or ricciardo's
I don't get my hopes up just yet
Anonymous
@J.Ende 3v4l.org/RDECp then you must have done something wrong somewhere :) Share your code
Wes
Wes
well.... you know you can tell. who's good in the first races is probably going to win at the end of the year
mercedes has a quick single lap but red bull has the best race pace
Anonymous
09:56
when does it start?
Wes
Wes
ferrari can't do neither
As long as the thing keeps driving a decent amount of the season..
Wes
Wes
7 am tomorrow qualifying, it's 6 am for uk
Dutch power MAX
Anonymous
I hope Hamilton has a shit season
Wes
Wes
09:56
then race i don't even know. there's also the fucking DST change
@JayIsTooCommon 3v4l.org/fchiB
Anonymous
@J
@JayIsTooCommon lol poopface
Wes
Wes
7 am race, inclusive of DST
I reckon I've got a skeleton, ready to join in @Wes ?
Wes
Wes
09:59
ok
@J.Ende you switched hash and password
@DaveRandom @JoeWatkins it's your wife's birthday in 2 days
give me ten minutes, I'll put on github
Also stahp using dutch names in your application
Anonymous
@J.Ende ordering :)
10:00
@JoeWatkins did you buy your wife anything yet?
Anonymous
!!docs password_verify
[ password_verify() ] Verifies that a password matches a hash
Wes
Wes
why is everybody talking of joe's wife birthday ahaha
if not, do it today
Anonymous
@J.Ende ^^^
10:00
no, it's getting close now, gonna do it today
she dropped very wide hints about wanting a bluetooth speaker for the pool bar ...
So you need to buy her a pool bar?
And a pool?
@PeeHaa still doesnt work me
we got both ...
Show off
Anonymous
R11 Partay at Joes
10:02
Dutch words are good
like max verstappen
right?
:D
No
It sucks in code / db
Also your session logic is broken
You have to start the session before any output
my brains are most of the time broken
that's because you are dutch
@JoeWatkins I've got a Cambridge Bluetone 100 that's really nice. Expensive though.
@J.Ende Yes, that is true
10:03
I start my session at the begin of opening my php
But you output html before starting the session
It does not work like that
for real
!!canon headers
837
Q: How to fix "Headers already sent" error in PHP

Moses89When running my script, I am getting several errors like this: Warning: Cannot modify header information - headers already sent by (output started at /some/file.php:12) in /some/file.php on line 23 The lines mentioned in the error messages contain header() and setcookie() calls. What could...

That is what is currently happening
10:04
Let me read this
k
/me is going to be busy again
Good luck
Thank you buddy
Any string debugging tools online? Need to check if there's some dodgy characters somewhere in this string
@Sean just urlencode it
Define "dodgy"? Invalid multi-byte sequences or just non-ascii?
10:11
yes. :P
that was not a yes/no question?
:-D
I've got an invalid JSON error from a string which looks fine.
Is your string supposed to be ascii?
Just paste it into Word. Then you know there will be dodgy characters.
what's the error?
10:12
I bet it's UTF-16
I bet you £0.01
Anonymous
always waving your money around
^ fyi "money" is what I call my penis
Just that there's invalid characters found
nevermind, I think there's tab characters in it
mb_check_encoding($str, 'UTF-8')
I think that's reliable
can never be sure with mb_*
is tab invalid in a JSON string?
Returned true, but it's definitely tabs.
str_replace("\t", ' ', $str) Sorted it out.
10:17
@DaveRandom you can have it in whitespace, but not in a doublequoted string
How the hell did someone get tabs into this in the first place, hot damn
@PaulCrovella wat
huh, til
That sounds just... arbitrary?
@Sean where did the data come from?
10:18
It's ye olde data which came from user input
I'm guessing someone wrote code to try and create a JSON string directly instead of using json_encode
@DaveRandom I bet you �0.02
@PeeHaa control characters have to be escaped
Actually I bet you £0.03
^ We have an unbelievable amount of that in this DB
@Leigh too rich for me
10:21
@PaulCrovella kk
Cool, two string replacements gets about 670 invalid json records down to 4.
they may now be "valid", doesn't mean they are useful
@Sean you can replace it with literal '\t' instead, to retain the tab
ain't nobody got time for tabs
@PaulCrovella Ah, cool! Thanks
@DaveRandom Not like it even matters, this data is so old I think GDPR means we've gotta wipe it out anyway
10:27
@DaveRandom I don't trust that extension much at all.. use pcre to validate utf-8 (it's quicker anyway) (bool)\preg_match("//u", $string)
and if you want to find out exactly where an error is, or what the erroring byte sequence is, i've a couple functions for that at github.com/pcrov/Unicode
@Sean "Yo momma so old that I will have to get rid of her when GDPR comes into force"?
/cc @PeeHaa ^
Anonymous
lol
@DaveRandom The word you are looking for is mature, not old
which is ironic, in this particular vein of conversation
:P
Pretty tame for a Friday though
10:31
!!issue Feature Request: !!mama / !!yomama (similar to !!dad)
@Sean I failed to create the issue :-(. You might want to create an issue about that. (HTTP Status: 404)
Can take a look at that tonight
404? O.o
!!version
Anonymous
10:32
GH probably changed their endpoint
Anonymous
or our auth is pooped
Wes
Wes
@PeeHaa 3 places penalty for ricciardo because he failed to slow down 10kmh
@PeeHaa No auth probably?
Wes
Wes
in fucking free practice
Anonymous
@kelunik you'd expect a better code though
Wes
Wes
10:32
they always remind me why i shouldn't watch this sport anymore
@Wes tbf it's a stupid mistake
@JayIsTooCommon Yes, but GitHub doesn't "leak" information to unauthorized parties.
But at least for public repositories there should be another code, because there's nothing to leak.
@Sean heh, hi5, I'm doing GDPR work today too
Email / Push consent logging
Anonymous
@kelunik good point
I hear / see so much gdpr everywhere
Should I be doing things?
10:35
Probably, and by probably I mean if you haven't started you need to start
Anonymous
@PeeHaa just close your eyes and block it out
I like @JayIsTooCommon's option better
Wes
Wes
@PeeHaa ?
he slowed down significantly, just not enough
because he failed to slow down 10kmh
Wes
Wes
10:37
a bit of flexibility i mean
it's not that he was doing 400kmh
lol wrong sport for flexibility
Anonymous
the more technology advances the more regulated sport is becoming. And it sucks.
Yep
Wes
Wes
but it's not even like that
because they change rules every time depending on what they like the most
I fucking hate docbook
Wes
Wes
10:38
it's just shit
Anonymous
they've started to destroy football with VAR
@Wes Not even what they like most
@PeeHaa yup
I feel like it's just coming of with stuff every season because
@JayIsTooCommon don't worry, I'm sure people will start using let and const eventually
10:39
Jeeves doesn't use cleverbot or any alternative now, right?
it's disabled in R11
Anonymous
@DaveRandom nerd
the "clever" part should be construed as mis-selling
Data Portability
GDPR introduces data portability - the right for a data subject to receive the personal data concerning them, which they have previously provided in a 'commonly use and machine readable format' and have the right to transmit that data to another controller.
lol
binary it is
Anonymous
@Wes Yeah, it's far too regulated and over complicated. Let them race, let them crash.
Anonymous
10:42
I still can't grasp how the new Halo isn't massively distracting, but the drivers don't seem to mind
@JayIsTooCommon Obviously there's no transparency without the regulation and nobody cares without high fines.
@JayIsTooCommon are you Jay Blanchard ?
Anonymous
@J.Ende no, better looking
ai he is a legend
so you are a copycat
Anonymous
10:58
righto

« first day (2715 days earlier)      last day (2458 days later) »