Good morning
This is the line:
var bimestre = "<?php $bim =(int) "<script> document.writeln(o); </script>"; Session::set("bolo", $bim); ?>"
In my humble opinion, you can make a php variable "print" to say it in some way, some content in the statements js, but in the opposite direction, which is what you seem to want to achieve, it does not work like that
the document.writeln () statement, prints values in the browser, not in the php script, that would be insecure.
visualize how the elements are organized, browser, server, http communication between them, and this arrangement of elements that interact, you can call it "architecture", and in the architectural model, you will notice, that there is no possibility that the browser, define the instructions declared on the server in a natural way.
imagine, if I could alter the javascript code on the server so simply, and with that start executing code right and left, without a form of authorization or point of entry, I could have the server at my disposal. craving
can be done technically, but it is not the focus of this technology