3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Adjusting the time for the notification to work. $then->modify('+1 second'); //Publications from sent friendship user $published_books1 = DB::table('published_books as a') ->join('user_relationships as b', 'a.user_id', '=', 'b.user_id') #->join('books as d', 'a.book_id', '=', 'd.id') ->join('users as e', 'a.user_id', '=', 'e.id') ->join('people as f', 'e.id', '=', 'f.user_id') ->where('b.request_status', $acknowledged_id) ->where(function ($query) use ($user) { $query->where('b.requester_id', $user->id); }) ->whereBetween('a.creted_at', [$then, $now]) ->where('e.username', '<>', Auth::user()->username) ->groupBy('a.id', 'e.id') ->select(DB::raw("concat(f.firstname, ' ', f.lastname) as name"), 'e.username', 'a.published_book_title as title', 'a.id'); if ($published_books1->count() > 0) { $notifications['published_books1'] = $published_books1->get(); /*Mail::send('emails.registro', array('key' => 'value'), function($message) { $message->subject('Bienvenido a la gran experiencia.'); $message->from(env('CONTACT_MAIL'), env('CONTACT_NAME')); $message->to(Auth::user()->email); }); */ } //Publications from received friendship users $published_books2 = DB::table('published_books as a') ->join('user_relationships as c', 'a.user_id', '=', 'c.requester_id') #->join('books as d', 'a.book_id', '=', 'd.id') ->join('users as e', 'a.user_id', '=', 'e.id') ->join('people as f', 'e.id', '=', 'f.user_id') ->where('c.request_status', $acknowledged_id) ->where('c.request_status', $acknowledged_id) ->where(function ($query) use ($user) { $query->where('c.requester_id', $user->id) ->orWhere('c.user_id', $user->id); }) ->whereBetween('a.creted_at', [$then, $now]) ->where('e.username', '<>', Auth::user()->username) ->groupBy('a.id', 'e.id') ->select(DB::raw("concat(f.firstname, ' ', f.lastname) as name"), 'e.username', 'a.published_book_title as title', 'a.id'); //Synchronizing to the former time $then->modify('-1 second'); if ($published_books2->count() > 0) { $notifications['published_books2'] = $published_books2->get(); /*Mail::send('emails.registro', array('key' => 'value'), function($message) { $message->subject('Bienvenido a la gran experiencia.'); $message->from(env('CONTACT_MAIL'), env('CONTACT_NAME')); $message->to(Auth::user()->email); }); */ }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.5.10.0140.00816.85
8.5.00.0120.00820.15
8.4.160.0140.00723.82
8.4.150.0020.00014.05
8.4.140.0100.01317.73
8.4.130.0130.00718.00
8.4.120.0050.00720.53
8.4.110.0140.00720.61
8.4.100.0050.00418.07
8.4.90.0120.00817.85
8.4.80.0130.00818.07
8.4.70.0070.00319.64
8.4.60.0140.00618.72
8.4.50.0050.00520.22
8.4.40.0070.01319.76
8.4.30.0000.00917.66
8.4.20.0070.01319.45
8.4.10.0130.00719.65
8.3.280.0020.00014.05
8.3.270.0120.00816.91
8.3.260.0140.00616.76
8.3.250.0150.00418.90
8.3.240.0120.00716.63
8.3.230.0140.00616.70
8.3.220.0120.00618.60
8.3.210.0110.00717.04
8.3.200.0050.00316.65
8.3.190.0110.00718.71
8.3.180.0120.00816.55
8.3.170.0100.01017.27
8.3.160.0130.00620.21
8.3.150.0060.01217.30
8.3.140.0060.00017.13
8.3.130.0070.00718.44
8.3.120.0040.00416.74
8.3.110.0080.00016.75
8.3.100.0050.00516.43
8.3.90.0040.00426.77
8.3.80.0030.00916.63
8.3.70.0070.01116.50
8.3.60.0080.00818.28
8.3.50.0110.00916.69
8.3.40.0090.00618.78
8.3.30.0070.00718.82
8.3.20.0070.00021.85
8.3.10.0080.00021.89
8.3.00.0000.00819.78
8.2.290.0110.00820.44
8.2.280.0110.00718.70
8.2.270.0070.01417.35
8.2.260.0060.00316.83
8.2.250.0060.00620.74
8.2.240.0160.00316.89
8.2.230.0030.00620.94
8.2.220.0000.00724.06
8.2.210.0040.00426.77
8.2.200.0070.00416.75
8.2.190.0090.00616.88
8.2.180.0000.01818.46
8.2.170.0150.00022.96
8.2.160.0060.00820.65
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0070.00019.83
8.2.110.0060.00319.43
8.2.100.0060.00617.88
8.2.90.0000.00817.88
8.2.80.0000.00819.33
8.2.70.0060.00318.05
8.2.60.0040.00418.22
8.2.50.0040.00418.10
8.2.40.0040.00422.22
8.2.30.0040.00419.21
8.2.20.0000.00818.13
8.2.10.0040.00418.04
8.2.00.0000.00718.14
8.1.330.0070.01521.94
8.1.320.0110.00916.49
8.1.310.0030.01718.29
8.1.300.0120.00619.90
8.1.290.0000.01030.84
8.1.280.0070.01325.92
8.1.270.0080.00020.65
8.1.260.0080.00026.35
8.1.250.0030.00628.09
8.1.240.0100.00022.08
8.1.230.0040.00821.11
8.1.220.0050.00317.74
8.1.210.0110.00018.77
8.1.200.0060.00317.13
8.1.190.0040.00417.34
8.1.180.0050.00318.10
8.1.170.0040.00418.69
8.1.160.0000.00818.77
8.1.150.0050.00220.23
8.1.140.0040.00419.59
8.1.130.0030.00518.85
8.1.120.0000.00717.34
8.1.110.0000.00717.45
8.1.100.0000.00817.44
8.1.90.0090.00017.48
8.1.80.0040.00417.39
8.1.70.0000.00817.43
8.1.60.0000.00817.56
8.1.50.0000.00817.55
8.1.40.0030.00617.51
8.1.30.0000.00817.74
8.1.20.0000.00717.53
8.1.10.0040.00417.45
8.1.00.0040.00417.53
8.0.300.0040.00419.83
8.0.290.0030.00716.75
8.0.280.0040.00418.47
8.0.270.0060.00316.91
8.0.260.0000.00718.82
8.0.250.0030.00616.96
8.0.240.0000.00916.94
8.0.230.0040.00416.91
8.0.220.0030.00716.95
8.0.210.0030.00316.86
8.0.200.0030.00617.00
8.0.190.0050.00317.08
8.0.180.0040.00416.90
8.0.170.0000.00716.94
8.0.160.0030.00316.83
8.0.150.0000.00716.94
8.0.140.0000.00716.83
8.0.130.0030.00313.37
8.0.120.0070.00316.91
8.0.110.0000.00817.04
8.0.100.0030.00516.93
8.0.90.0070.00016.93
8.0.80.0060.01016.93
8.0.70.0000.00716.84
8.0.60.0030.00517.09
8.0.50.0030.00516.82
8.0.30.0110.00816.87
8.0.20.0150.01517.40
8.0.10.0000.00717.00
8.0.00.0180.00617.02
7.4.330.0000.00615.55
7.4.320.0040.00416.54
7.4.300.0060.00016.48
7.4.290.0000.00916.47
7.4.280.0050.00316.59
7.4.270.0000.01016.61
7.4.260.0070.00016.51
7.4.250.0000.00716.44
7.4.240.0000.00716.54
7.4.230.0000.00716.63
7.4.220.0100.00716.64
7.4.210.0100.00416.66
7.4.200.0040.00416.41
7.4.160.0100.00616.50
7.4.150.0150.00517.40
7.4.140.0100.00917.86
7.4.130.0040.01516.60
7.4.120.0110.00916.59
7.4.110.0030.01416.55
7.4.100.0070.01116.32
7.4.90.0100.00716.42
7.4.80.0040.01419.39
7.4.70.0060.01116.71
7.4.60.0060.01216.51
7.4.50.0090.00616.60
7.4.40.0100.01316.54
7.4.30.0200.00516.38
7.4.00.0040.01515.23
7.3.330.0030.00313.20
7.3.320.0000.00613.34
7.3.310.0030.00316.43
7.3.300.0000.00716.23
7.3.290.0060.00916.39
7.3.280.0090.00916.38
7.3.270.0090.01517.40
7.3.260.0080.00916.33
7.3.250.0110.00916.42
7.3.240.0050.01516.47
7.3.230.0100.01016.50
7.3.210.0030.01316.32
7.3.200.0110.00516.66
7.3.190.0120.00316.53
7.3.180.0070.01216.60
7.3.170.0000.01716.39
7.3.160.0100.00716.38
7.2.330.0110.00816.34
7.2.320.0070.01016.55
7.2.310.0100.00616.39
7.2.300.0060.01216.33
7.2.290.0120.00616.52
7.2.60.0080.00816.91
7.2.00.0060.00619.23
7.1.200.0090.00615.50
7.1.70.0070.01116.77
7.1.60.2230.01033.19
7.1.50.1970.01032.75
7.1.40.1670.02032.50
7.1.30.2700.02032.47
7.1.20.1670.01732.84
7.1.10.1470.01314.50
7.1.00.1530.01714.92
7.0.200.1700.00714.73
7.0.190.1900.01314.78
7.0.180.1830.01314.31
7.0.170.1670.01014.15
7.0.160.2030.01314.33
7.0.150.1170.01314.28
7.0.140.2270.01314.34
7.0.130.1270.01014.61
7.0.120.1400.02014.57
7.0.110.1400.00714.33
7.0.100.0900.01014.56
7.0.90.1300.01314.33
7.0.80.1500.01014.41
7.0.70.0930.01014.36
7.0.60.1300.00314.02
7.0.50.1000.01014.64
7.0.40.1130.01714.51
7.0.30.1030.01314.64
7.0.20.0900.00714.57
7.0.10.0830.01314.48
7.0.00.0930.00314.45

preferences:
37.5 ms | 403 KiB | 5 Q